Git Product home page Git Product logo

pyqt-tools's Introduction

pyqt-tools

PyPI version supported Python versions source on GitHub

The PyQt6 wheels do not provide tools such as Qt Designer that were included in the old binary installers. This package aims to provide those in a separate package which is useful for developers while the official PyQt6 wheels stay focused on fulfilling the dependencies of PyQt6 applications.

Both Windows and Linux are supported. Adjust paths etc accordingly if applying the explanations below in Linux rather than Windows. macOS support is incomplete but see issue #12 if you want to discuss it.

Installation

yourenv/Scripts/pip.exe install pyqt6-tools~=6.4

You will generally install pyqt6-tools using pip install. In most cases you should be using virtualenv or venv to create isolated environments to install your dependencies in. The above command assumes an env in the directory yourenv. The ~=6.4 specifies a release compatible with 6.4 which will be the latest version of pyqt6-tools built for PyQt6 6.4. If you are using a different PyQt6 version, specify it instead of 6.4. PyPI keeps a list of all available versions.

Note:
As of pyqt6-tools v3 the package has been broken down into four pieces. The wrappers remain here but the plugins are located in pyqt6-plugins, some Qt application helpers in qt6-tools, and the applications are in qt6-applications.

Usage

A program is provided available as Scripts/pyqt6-tools.exe. There are subcommands provided for each of Designer, QML Scene, and the QML Test Runner. These wrapper commands provide additional functionality related to launching the underlying programs. A larger set of Qt application are available as subcommands of the Scripts/qt6-tools.exe program. In both cases, passing --help will list the available subcommands.

Additionally, each pyqt6-tools subcommand listed below includes a parameter to run a basic example which can be used to see if the plugins are working. These examples are not intended to be used as examples of good code.

Each subcommand searches up the filesystem tree from your current working directory to find a .env file and loads it if found. If found, the environment variable DOT_ENV_DIRECTORY will be set to the directory containing the .env file. With this extra variable you can specify paths relative to the .env location.

There alternative ways to call Scripts/pyqt6-tools.exe, python -m pyqt6_tools works the same way but allows you to choose the version of python to run the tools with. On Windows if you create a shortcut to pyqt6-tools.exe, it will show a command prompt that stays open for the duration of the launched application. You can address this by using Scripts/pyqt6-toolsw.exe or pythonw -m pyqt6_tools.

PYQTDESIGNERPATH=${PYQTDESIGNERPATH};${DOT_ENV_DIRECTORY}/path/to/my/widgets

Designer

There is a Scripts/pyqt6-tools.exe designer.exe entry point that will help fill out PYQTDESIGNERPATH from either command line arguments or a .env file. Unknown arguments are passed through to the original Qt Designer program.

Usage: pyqt6-tools designer [OPTIONS]

Options:
  -p, --widget-path DIRECTORY     Paths to be combined with PYQTDESIGNERPATH
  --example-widget-path           Include the path for the pyqt6-tools example
                                  button (c:\users\sda\testenv\lib\site-
                                  packages\pyqt6_plugins)

  --designer-help                 Pass through to get Designer's --help
  --test-exception-dialog         Raise an exception to check the exception
                                  dialog functionality.

  --qt-debug-plugins / --no-qt-debug-plugins
                                  Set QT_DEBUG_PLUGINS=1
  --help                          Show this message and exit.

If you want to view the generated code from within Designer, you can run Scripts/pyqt6-tools.exe installuic and it will copy pyuic6.exe such that Designer will use it and show you generated Python code. Note that this will enable viewing using the C++ menu item while the Python menu item will be broken. Without having made this adjustment, the C++ option shows C++ code while the Python option shows PySide2 code. pyqt6 must already be installed or this script will be unable to find the original pyuic6.exe to copy.

In addition to the standard features of the official Designer plugin, this provides an exception dialog for your widget's Python code. Otherwise Designer in Windows silently crashes on Python exceptions.

QML Plugin

The QML plugin is also included. In the future a tool may be provided to handle copying of the plugin to each directory where it is needed. For now this must be done manually.

site-packages/pyqt6_tools/Qt/bin/plugins/pyqt6qmlplugin.dll

QML Scene

Usage: pyqt6-tools qmlscene [OPTIONS]

Options:
  -p, --qml2-import-path DIRECTORY
                                  Paths to be combined with QML2_IMPORT_PATH
  --qmlscene-help                 Pass through to get QML scene's --help
  --qt-debug-plugins / --no-qt-debug-plugins
                                  Set QT_DEBUG_PLUGINS=1
  --run-qml-example               Run the pyqt6-tools QML example
  --help                          Show this message and exit.

QML Test Runner

Usage: pyqt6-tools qmltestrunner [OPTIONS]

Options:
  -p, --qml2-import-path DIRECTORY
                                  Paths to be combined with QML2_IMPORT_PATH
  --qmltestrunner-help            Pass through to get QML test runner's --help
  --qt-debug-plugins / --no-qt-debug-plugins
                                  Set QT_DEBUG_PLUGINS=1
  --test-qml-example              Test the pyqt6-tools QML example
  --help                          Show this message and exit.

Special Thanks

MacStadium

Thanks to MacStadium for providing me with a macOS system to develop and test out the final pyqt6-tools platform. This is still 'in work'. See issue #12.

pyqt-tools's People

Contributors

altendky avatar mhendricks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyqt-tools's Issues

generate_module_literal.py

(or maybe cffi can do it instead?)

 ~/pyqt5-tools   master  cat generate_module_literal.py 
import os
import itertools


# https://repl.it/IwNE/4
def chunker(iterable, n):
    "Collect data into fixed-length chunks or blocks except last due to lack of fill."
    # chunker('ABCDEFG', 3) --> ABC DEF G"

    i = iter(iterable)

    while True:                                                                                                                                                                                                                                                               
        t = tuple(next(i) for _ in range(n))                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                              
        if len(t) > 0:                                                                                                                                                                                                                                                        
            yield t                                                                                                                                                                                                                                                           
        else:                                                                                                                                                                                                                                                                 
            break                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              
with open('excepthook.py', 'rb') as f:                                                                                                                                                                                                                                        
    raw = f.read()                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                              
with open('excepthook.c', 'w', newline='\n') as f:                                                                                                                                                                                                                            
    f.write('const char * moduleName = "exceptiondialog";\n\n')                                                                                                                                                                                                               
    f.write('const char moduleCode[] = {\n')                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                              
    indent = ' ' * 4                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                              
    chunks = chunker(itertools.chain(raw, b'\0'), 10)                                                                                                                                                                                                                         
    lines = (', '.join('0x{:02x}'.format(b) for b in chunk) for chunk in chunks)                                                                                                                                                                                              
    lines = (',\n'.join(indent + line for line in lines))                                                                                                                                                                                                                     
    for line in lines:                                                                                                                                                                                                                                                        
        f.write(line)                                                                                                                                                                                                                                                         
    f.write("\n};\n")

translations doesn't work on linguist

PyQt5 version: 5.13.0
pyqt5-tools version: 5.13.0.1.5

I put a linguist_zh_CN.qm to pyqt5_tools\Qt\bin\translations, but the translations doesn't work on linguist like the picutre below.

image

Looking forward to your reply, Thank you for your work!

Installing pyqt5-tools in Windows: Connection aborted issue

Dear Folks,

I am fairly inexperienced with Python. Please bear with me.

Environment: Windows OS, pip 19.1.1 from anaconda installation.

I am interested in learning how to develop GUI's in PyQT. An online video suggested the way to start was to download pyqt5-tools using pip. The errors I get are:

(base) C:\Users\kwdh>pip install pyqt5-tools --verbose
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\kwdh\AppData\Local\Temp\pip-ephem-wheel-cache-fmw_27a7
Created temporary directory: C:\Users\kwdh\AppData\Local\Temp\pip-req-tracker-3x_y37s_
Created requirements tracker 'C:\Users\kwdh\AppData\Local\Temp\pip-req-tracker-3x_y37s_'
Created temporary directory: C:\Users\kwdh\AppData\Local\Temp\pip-install-bb68fzo5
Collecting pyqt5-tools
1 location(s) to search for versions of pyqt5-tools:

  • https://pypi.org/simple/pyqt5-tools/
    Getting page https://pypi.org/simple/pyqt5-tools/
    Looking up "https://pypi.org/simple/pyqt5-tools/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pyqt5-tools/
    Starting new HTTPS connection (2): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pyqt5-tools/
    Starting new HTTPS connection (3): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pyqt5-tools/
    Starting new HTTPS connection (4): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pyqt5-tools/
    Starting new HTTPS connection (5): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pyqt5-tools/
    Starting new HTTPS connection (6): pypi.org:443
    Could not fetch URL https://pypi.org/simple/pyqt5-tools/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pyqt5-tools/ (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))) - skipping
    ERROR: Could not find a version that satisfies the requirement pyqt5-tools (from versions: none)
    Cleaning up...
    Removed build tracker 'C:\Users\kwdh\AppData\Local\Temp\pip-req-tracker-3x_y37s_'
    ERROR: No matching distribution found for pyqt5-tools
    Exception information:
    Traceback (most recent call last):
    File "C:\Users\kwdh\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_internal\cli\base_command.py", line 178, in main
    status = self.run(options, args)
    File "C:\Users\kwdh\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_internal\commands\install.py", line 352, in run
    resolver.resolve(requirement_set)
    File "C:\Users\kwdh\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_internal\resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
    File "C:\Users\kwdh\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_internal\resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
    File "C:\Users\kwdh\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_internal\resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
    File "C:\Users\kwdh\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_internal\operations\prepare.py", line 282, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
    File "C:\Users\kwdh\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_internal\req\req_install.py", line 198, in populate_link
    self.link = finder.find_requirement(self, upgrade)
    File "C:\Users\kwdh\AppData\Local\Continuum\anaconda3\lib\site-packages\pip_internal\index.py", line 792, in find_requirement
    'No matching distribution found for %s' % req
    pip._internal.exceptions.DistributionNotFound: No matching distribution found for pyqt5-tools
    Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
    Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
    1 location(s) to search for versions of pip:
  • https://pypi.org/simple/pip/
    Getting page https://pypi.org/simple/pip/
    Looking up "https://pypi.org/simple/pip/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    Could not fetch URL https://pypi.org/simple/pip/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))) - skipping

I also have Windows Subsystem for Linux on the same Windows machine, with pip 19.3.1 from miniconda/python3.7.

Here is the error there:

(base) ktwalker@pf1f54yv20l6:~$ pip --verbose install pyqt5-tools
Created temporary directory: /tmp/pip-ephem-wheel-cache-xliq7ixo
Created temporary directory: /tmp/pip-req-tracker-vh1fg4hi
Created requirements tracker '/tmp/pip-req-tracker-vh1fg4hi'
Created temporary directory: /tmp/pip-install-jvynshat
1 location(s) to search for versions of pyqt5-tools:

  • https://pypi.org/simple/pyqt5-tools/
    Getting page https://pypi.org/simple/pyqt5-tools/
    Found index url https://pypi.org/simple
    Looking up "https://pypi.org/simple/pyqt5-tools/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')"))': /simple/pyqt5-tools/
    Starting new HTTPS connection (2): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')"))': /simple/pyqt5-tools/
    Starting new HTTPS connection (3): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')"))': /simple/pyqt5-tools/
    Starting new HTTPS connection (4): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')"))': /simple/pyqt5-tools/
    Starting new HTTPS connection (5): pypi.org:443
    Incremented Retry for (url='/simple/pyqt5-tools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')"))': /simple/pyqt5-tools/
    Starting new HTTPS connection (6): pypi.org:443
    Could not fetch URL https://pypi.org/simple/pyqt5-tools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pyqt5-tools/ (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')"))) - skipping
    Given no hashes to check 0 links for project 'pyqt5-tools': discarding no candidates
    ERROR: Could not find a version that satisfies the requirement pyqt5-tools (from versions: none)
    Cleaning up...
    Removed build tracker '/tmp/pip-req-tracker-vh1fg4hi'
    ERROR: No matching distribution found for pyqt5-tools
    Exception information:
    Traceback (most recent call last):
    File "/home/ktwalker/miniconda3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
    status = self.run(options, args)
    File "/home/ktwalker/miniconda3/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 382, in run
    resolver.resolve(requirement_set)
    File "/home/ktwalker/miniconda3/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 201, in resolve
    self._resolve_one(requirement_set, req)
    File "/home/ktwalker/miniconda3/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 365, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
    File "/home/ktwalker/miniconda3/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 311, in _get_abstract_dist_for
    req.populate_link(self.finder, upgrade_allowed, self.require_hashes)
    File "/home/ktwalker/miniconda3/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 225, in populate_link
    self.link = finder.find_requirement(self, upgrade)
    File "/home/ktwalker/miniconda3/lib/python3.7/site-packages/pip/_internal/index.py", line 906, in find_requirement
    'No matching distribution found for %s' % req
    pip._internal.exceptions.DistributionNotFound: No matching distribution found for pyqt5-tools
    1 location(s) to search for versions of pip:
  • https://pypi.org/simple/pip/
    Getting page https://pypi.org/simple/pip/
    Found index url https://pypi.org/simple
    Looking up "https://pypi.org/simple/pip/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')"))) - skipping
    Given no hashes to check 0 links for project 'pip': discarding no candidates

Any ideas to my issue? I do not have a proxy server. But I am behind firewalls. I can do apt-get installs just fine and use curl to get stuff without issue in general. But for some reason, I have issues with pypi.org website here and with other packages.

Kind regards,
Kris

Scripts fail to run after 'freezing' with pyinstaller

Python: 3.7.2
pyqt5-tools: v5.13.0.1.5

When using v5.11.3.1.4 (and even in v5.12.1.1.5rc4) built exe's run fine when they are created using pyinstaller. However, after the latest version release, pyinstaller cannot seem to find the pyqt5.sip module. It seems to have something to do with the entrypoint changes to the build.py file in commit a23a364.

For now i can run the previous version, and i understand if you would rather not look into a fix since the issue is pyinstaller related and might not be a problem for other users. If there's any other testing i can do, let me know.

Package name must be corrected

Hello everyone, the current name for this package is pyqt5-tools, on the other hand, it must be PyQt5-tools in order to maintain visual similarity
As you can see from pip list :
Package Version


.....
pip 18.1
....
PyQt5 5.11.3
PyQt5-sip 4.19.13
pyqt5-tools 5.11.3.1.4
.....

Invisibles plugins ?

Hello,

Thank you for your pyqt5-tools !
I did not manage to make appear plugin examples in Qt Designer. I installed a clean python 3.6.4 , I made a pip3 install PyQt5==5.9 (to be at the same version as pyqt5-tools),and I made a pip install pyqt5-tools.I modified the examples/designer/plugins/plugins.py script to find the binary designer.
In help> plugin Information, i have an error message telling "Cannot load library ......\pyqt5-tools\plugins\designer\pyqt5.dll: the specified module could not be found". I'm sure that the file existe and that designer found it because when I remove it , in help> plugin Information, QtDesigner juste say "QtDesigner could'nt find any plugins". Did you manage to have plugins visible in Qt Designer?
I really need it.

Cheers,

Baptiste

vcruntime140_1.dll is missing

Hi there,
I'm trying to open designer from :
C:\Users\MyUsername\AppData\Local\Programs\Python\Python38\Lib\site-packages\pyqt5_tools\Qt\bin\designer.exe
but I'm getting
missing vcruntime140_1.dll
PS:
Python 3.8.2
pyqt 5.15.0

thanks.

Python-3.9 support

Would it be also possible to get a Python-3.9 wheel for Windows 10 64 bit ?

If you need space on pypi, I would suggest that maybe old 32bit wheels may have to go

launching QT Designer

It was a little less than trivial for me to figure out how to launch the QT designer (the official distribution puts shortcuts everywhere).

FYI it's Lib\site-packages\pyqt5-tools\designer\designer.exe and it might be worth noting this on the long_description

Cannot install pyqt5-tools via pip

I cannot install the pyqt5-tools via pip. I first tried normally, and then after reading your suggestion for the other person, I setup virtualenv, and had pyqt successfully install there (as opposed to where I already had it installed, so I know I set this up right) However, the pyqt-tools don't.
I am on Windows 10 if it helps.

Where is the designer binary?

@jnickscott, it's best to open your own ticket for your own issue.

I don't have access to Windows at the moment but it's something like theenv\lib\site-packages\pyqt5_tools. If nothing else you can search for designer.exe.

It is good to use virtualenv or venv to create an isolated environment for each project you work on to install your packages in.

Merge PyQt5 with pyqt5-tools?

Presently, pyqt5-tools has redundant files with https://pypi.python.org/pypi/PyQt5/ making the download much larger. Do I understand correctly that pyqt5-tools is specific to a particular version of PyQt5? If so, how about creating a variation of pyqt5-tools that is a merge of the two? This would eliminate redundant files. I am hoping the merged version would reduce the probability of bugs too. If the download size is small enough, I am also hoping it will be included with the WinPython distribution, which used to include Qt Designer with PyQt4.

Qt Assistant cannot work well under Windows

Dear,
My pyqt5-tools is the latest version. When I try to use Qt Assistant, or check the manual of Qt Linguist, it raise an error like:"Unable to launch Qt Assistant (C:/ProgramData/Anaconda3/Lib/site-packages/pyqt5-tools/bin\assistant)"

The path separator between bin and assistant is backslash, does this lead to this error?

Thanks for attention to this matter.

Incomplete wheelhouse for v1.7.5

Yep, ran into PyPI's 30GB project limit so only some of the v1.7.5 wheels (with the translations files in Linux) were successfully uploaded. I need to find time to go through my options and resolve this.

cannot successfully install pyqt5-tools

I have tried to install pyqt5-tools in the command line using 'pip install pyqt5-tools' and in Pycharm. But the results are the same, they appeared an error occurring that 'UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 2597: illegal multibyte sequence'. Later I would show the whole command output information.

Support Mac/OS X

Hi,
I installed pyqt5 with CLI command "pip3 install pyqt5".
But when I install PyQt5-tools with the same way : pip3 install PyQt5-tools, it shows message below:

Could not find a version that satisfies the requirement PyQt5-tools (from versions: )
No matching distribution found for PyQt5-tools

I have read other issues, and I know maybe it is too big to put it on pypi.

Do anybody knows how to install PyQt5-tools on mac?
THX.

Custom plugin fails to load with pyqt5 5.11.3

I'm trying to load a custom plugin into designer and pyqt5designer silently crashes when it tries to load it.

Python version: 3.6.5
pyqt5 version: 5.11.3
pyqt5_tools version: 5.11.3.1.4rc0

I also tried to run pyqt5designer --test-exception-dialog and that crashes silently as well.

When testing with pyqt5 version 5.11.2 it seems to work just fine.

Python 3.7.0

I recently tried to install pyqt-tools on Windows with Python 3.7.0, and it said that no versions could be found.

  Could not find a version that satisfies the requirement pyqt5-tools (from versions: )
No matching distribution found for pyqt5-tools

Version for PyQt5.14

Can you please create new version for recent version (5.14.1) PyQt5 and py 3.8?

view python code not working

When you go to view phyton code
image
It does not work because

They look for a path C:\Users[username]\AppData\Roaming\Python\Python38\site-packages\pyqt5_tools\Qt\bin\bin\uic.exe
but the correct path is just one \bin
I created the directory and worked. But I don't know where in the source code file is this path to correct

The library will not be installed in Python 3.9

Hello
Thanks for your awesome library
But this version is not installed in Python version 3.9 on windows 10

ERROR: Could not find a version that satisfies the requirement pyqt5-tools (from versions: none)
ERROR: No matching distribution found for pyqt5-tools

Support Linux

When the author plan to implement the linux version of the tools?

pylupdate5 cause UnicodeEncodeError: 'latin-1' codec can't encode

Python version: 3.6.4
PyQt5 version: 5.13.0
pyqt5-tools version: 5.13.0.1.5

I use pylupdate5 test.py -ts zh_CN.ts, but it cause UnicodeEncodeError: 'latin-1' codec can't encode characters in position 12-14: ordinal not in range(256)

test.py

# -*- coding: utf-8 -*-
import sys
from PyQt5.QtCore import QRect
from PyQt5.QtWidgets import QMainWindow, QApplication, QPushButton, QDialog


class Mwindow(QDialog):
    def __init__(self):
        super(Mwindow, self).__init__()
        self.resize(100, 60)
        self.down1 = QPushButton(self.tr('download'), self)
        self.down1.setGeometry(QRect(10, 5, 90, 23))

        self.down2 = QPushButton(self.tr('upload'), self)
        self.down2.setGeometry(QRect(10, 30, 90, 23))


if __name__ == '__main__':
    app = QApplication(sys.argv)
    mainWin = Mwindow()
    mainWin.show()
    sys.exit(app.exec_())

Thank you for your work!

Version for PyQt5.12.x

Can you please create new version for recent version (5.12.1) PyQt5?
Your package requires PyQt5==5.11.3

"Code generation failed" (Launched via Python Scripts folder)

  • Base setup info (Windows 10 - Pro):
  • Installed pyqt5 and pyqt5-tools via pip3 command - No errors/installed properly/
  • PATH is setup properly for Python 3.7.4 and PyQt5 and PyQt5-Tools
  • Actual link to PyQt5 Designer script is: C:\Python\Python37\Scripts\pyqt5designer.exe
    =============
    Steps to reproduce
    =============
  1. Open PyQt5 Designer (via Python Script folder)
  2. Create a 1 button form and save.
  3. Go to "Form>>View Code" and the error listed below is shown.

Code Generation Failed


Unable to launch c:/python/python37/lib/site-packages/pyqt5_tools/Qt/bin/bin/uic.


OK


Can't install qt5 via pip

I tried `pip install pyqt5-tools' It did not work.
error message - Could not find a version that satisfies the requirement pyqt5-tools (from versions: )
No matching distribution found for pyqt5-tools
You are using pip version 8.1.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Works in a virtualenv... not a venv though

When running from a virtualenv and specifying the paths for PQTDESIGNERPATH (either via .env or via the -p CLI option of pyqt5designer) Designer starts and works as expected (shows the widgets if they are installed or error dialogs if they are not). From a venv you instead get a silent exit and DebugView output per below.

Tested against:
https://ci.appveyor.com/api/buildjobs/1sy95v1fx6dxgslp/artifacts/pyqt5_tools-5.11.2.1.3rc2.post8-cp36-none-win32.whl

PS C:\Users\sda\desktop> venv\scripts\pyqt5designer -p st/sub/epyqlib/epyqlib
PS C:\Users\sda\desktop> virtualenv\scripts\pyqt5designer -p st/sub/epyqlib/epyqlib

Aborted!

DebugView capture from above venv command.

[180] Preparing to import module
[180] About to import module
[180] An error occurred while importing the module
[180] PyErr_Occurred() != NULL
[180] ptype == NULL :  false
[180] pvalue == NULL :  false
[180] ptraceback == NULL :  false
[180] pystr == NULL :  false
[180] pystr == NULL :  false
[180] str == NULL :  false
[180] str:  No module named 'PyQt5'
[180] error_description == NULL :  false
[180] error_description:  No module named 'PyQt5'
[180] pyth_module == NULL :  false
[180] pyth_func && PyCallable_Check(pyth_func)
PS C:\Users\sda\desktop> venv\scripts\python --version --version
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
PS C:\Users\sda\desktop> virtualenv\scripts\python --version --version
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
PS C:\Users\sda\desktop> venv\scripts\pip freeze
click==6.7
PyQt5==5.11.2
PyQt5-sip==4.19.12
pyqt5-tools==5.11.2.1.3rc2.post8
python-dotenv==0.9.1
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
PS C:\Users\sda\desktop> virtualenv\scripts\pip freeze
click==6.7
PyQt5==5.11.2
PyQt5-sip==4.19.12
pyqt5-tools==5.11.2.1.3rc2.post8
python-dotenv==0.9.1

PyQt 5.6 not building

https://ci.appveyor.com/project/KyleAltendorf/pyqt5-tools/build/203/job/0ke3i12iep0dc9ff

Some extra debugging in configure.py:

# Check the result.
if mname == 'Qt':
    file_check = 'sip%scmodule.c' % mname
else:
    file_check = 'sipAPI%s.h' % mname

print(repr(mname))
print(repr(file_check))
print(repr(os.path.join(mname, file_check)))
if not os.access(os.path.join(mname, file_check), os.F_OK):
    error("Unable to create the C++ code.")�
C:\projects\pyqt5-tools\src\PyQt5_gpl-5.6>C:\\projects\\pyqt5-tools\\venv\\Scrip
ts\\python configure.py --static --sysroot=C:\\projects\\pyqt5-tools\\sysroot --
no-tools --no-qsci-api --no-qml-plugin --configuration=C:\\projects\\pyqt5-tools
\\src\\PyQt5_gpl-5.6\\pyqt5-win.cfg --confirm-license --sip=C:\\projects\\pyqt5-
tools\\sysroot\\native\\sip.exe --bindir=C:\\projects\\pyqt5-tools\\sysroot\\pyq
t5-install\\bin --destdir=C:\\projects\\pyqt5-tools\\sysroot\\pyqt5-install\\des
t --designer-plugindir=C:\\projects\\pyqt5-tools\\sysroot\\pyqt5-install\\design
er --enable=QtDesigner --target-py-version=3.5 --qmake=c:\\\\Qt\\\\5.6\\msvc2015
\\bin\\qmake.exe
Querying qmake about your Qt installation...
Reading configuration from
C:\projects\pyqt5-tools\src\PyQt5_gpl-5.6\pyqt5-win.cfg...
This is the GPL version of PyQt 5.6 (licensed under the GNU General Public
License) for Python 3.6.1 on win32.
Found the license file pyqt-gpl.sip.
Checking to see if the dbus support module should be built...
DBus v1 does not seem to be installed.
Qt v5.6.2 is being used.
The qmake executable is c:\Qt\5.6\msvc2015\bin\qmake.exe.
Qt is built as a static library.
The system root directory is C:\projects\pyqt5-tools\sysroot.
SIP 4.19 is being used.
The sip executable is C:\projects\pyqt5-tools\sysroot\native\sip.exe.
These PyQt5 modules will be built: QtDesigner.
The PyQt5 Python package will be installed in
C:\projects\pyqt5-tools\sysroot\pyqt5-install\dest.
PyQt5 is being built with generated docstrings.
The Designer plugin will be installed in
C:\projects\pyqt5-tools\sysroot\pyqt5-install\designer.
The qmlscene plugin will not be built.
The PyQt5 PEP 484 stub files will be installed in
C:\projects\pyqt5-tools\venv\Lib\site-packages\PyQt5.
The PyQt5 .sip files will be installed in
C:\projects\pyqt5-tools\sysroot/share/sip/PyQt5.
pyuic5, pyrcc5 and pylupdate5 will not be built.
Generating the C++ source for the QtDesigner module...
'QtDesigner'
'sipAPIQtDesigner.h'
'QtDesigner\\sipAPIQtDesigner.h'
Error: Unable to create the C++ code.�

The QtDesigner directory is empty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.