Tools to supplement the official PyQt5 wheels
Project description
The PyQt5 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 PyQt5 wheels stay focused on fulfilling the dependencies of PyQt5 applications.
Installation
yourenv\Scripts\pip.exe install --pre pyqt5-tools~=5.11
You will generally install pyqt5-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 --pre allows for the latest version to be installed despite not being a full release version. You will have to decide if this is a good option for you at any given point in time. The ~=5.11 specifies a release compatible with 5.11 which will be the latest version of pyqt5-tools built for PyQt5 5.11. If you are using a different PyQt5 version, specify it instead of 5.11. PyPI keeps a list of all available versions.
Usage
For each tool a script is created such that you get files like Scripts\designer.exe to launch the programs. Each one 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.
PYQTDESIGNERPATH=${PYQTDESIGNERPATH};${DOT_ENV_DIRECTORY}/path/to/my/widgets
Additionally, each pyqt5* wrapper 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.
Designer
There is a Scripts\pyqt5designer.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: pyqt5designer [OPTIONS]
Options:
-p, --widget-path DIRECTORY Paths to be combined with PYQTDESIGNERPATH
--example-widget-path Include the path for the pyqt5-tools example
button (c:\users\sda\testenv\lib\site-
packages\pyqt5_tools)
--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 use Form > View Code... from within Designer you can run Scripts\pyqt5toolsinstalluic.exe and it will copy pyuic5.exe such that Designer will use it and show you generated Python code. pyqt5 must already be installed or this script will be unable to find the original pyuic5.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\pyqt5_tools\Qt\bin\plugins\pyqt5qmlplugin.dll
QML Scene
Usage: pyqt5qmlscene [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 pyqt5-tools QML example
--help Show this message and exit.
QML Test Runner
Usage: pyqt5qmltestrunner [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 pyqt5-tools QML example
--help Show this message and exit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for pyqt5_tools-5.11.3.1.5rc0-cp37-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 437ee3e258ba1f429cbc9e8c3dfb82471d49eedef7b8df6b093aab8b5e2742d0 |
|
MD5 | 40bd2e847aa4def4e470d007be5a19da |
|
BLAKE2b-256 | 918cef7251bb530ea31a1c486aafba3ae02e476bae376f387f2a0d0f0a3fdaf0 |
Hashes for pyqt5_tools-5.11.3.1.5rc0-cp36-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dfb494af2ba9e932d3b6239ffb8fa64f4de1ce43e9614562c880376811e02d5 |
|
MD5 | 4ad891f2ee23c686bba8d494237a3d86 |
|
BLAKE2b-256 | 7ba8123d1b7c1889db78dc8385fcbc3b6e4f394acebc882363bdc7465737ed06 |
Hashes for pyqt5_tools-5.11.3.1.5rc0-cp35-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d8fc01bf183eb2b8f9015352ea1c3f4e4477a2de193c6664df0171ecd49b591 |
|
MD5 | ddc59bcb108404ecf34d5c2a14f1e22a |
|
BLAKE2b-256 | 76d9451ca72f8568eb503670e3aef46f89936375f102a346b993543366ef02fe |