pyqt5-tools


Namepyqt5-tools JSON
Version 5.15.9.3.3 PyPI version JSON
download
home_pagehttps://github.com/altendky/pyqt-tools
SummaryPyQt Designer and QML plugins
upload_time2023-03-27 19:26:56
maintainer
docs_urlNone
authorKyle Altendorf
requires_python>=3.7
licenseGPLv3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==========
pyqt-tools
==========


|PyPI| |Pythons| |GitHub|

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.

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.

.. |PyPI| image:: https://img.shields.io/pypi/v/pyqt5-tools.svg
   :alt: PyPI version
   :target: https://pypi.org/project/pyqt5-tools/

.. |Pythons| image:: https://img.shields.io/pypi/pyversions/pyqt5-tools.svg
   :alt: supported Python versions
   :target: https://pypi.org/project/pyqt5-tools/

.. |GitHub| image:: https://img.shields.io/github/last-commit/altendky/pyqt-tools/main.svg
   :alt: source on GitHub
   :target: https://github.com/altendky/pyqt-tools

.. _`issue #12`: https://github.com/altendky/pyqt-tools/issues/12

------------
Installation
------------

.. code-block:: powershell

  yourenv/Scripts/pip.exe install pyqt5-tools~=5.15

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 ``~=5.15`` specifies a `release compatible with`_
5.15 which will be the latest version of pyqt5-tools built for PyQt5_ 5.15. If
you are using a different PyQt5 version, specify it instead of 5.15.  PyPI
keeps a list of `all available versions`_.

.. _virtualenv: https://virtualenv.pypa.io/en/stable/
.. _venv: https://docs.python.org/3/library/venv.html
.. _PyQt5: https://pypi.org/project/PyQt5/
.. _`release compatible with`: https://www.python.org/dev/peps/pep-0440/#compatible-release
.. _`all available versions`: https://pypi.org/project/pyqt5-tools/#history

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

.. _pyqt5-plugins: https://github.com/altendky/pyqt-plugins
.. _qt5-tools: https://github.com/altendky/qt-tools
.. _qt5-applications: https://github.com/altendky/qt-applications

-----
Usage
-----

A program is provided available as ``Scripts/pyqt5-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/qt5-tools.exe`` program.  In both cases, passing
``--help`` will list the available subcommands.

Additionally, each ``pyqt5-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.

.. code-block:: powershell

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


Designer
========

There is a ``Scripts/pyqt5-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.

.. code-block::

    Usage: pyqt5-tools designer [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_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/pyqt5-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.  ``pyqt5`` 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/pyqt5_tools/Qt/bin/plugins/pyqt5qmlplugin.dll``

QML Scene
=========

.. code-block::

    Usage: pyqt5-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 pyqt5-tools QML example
      --help                          Show this message and exit.

QML Test Runner
===============

.. code-block::

    Usage: pyqt5-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 pyqt5-tools QML example
      --help                          Show this message and exit.


--------------
Special Thanks
--------------

|MacStadium|

.. |MacStadium| image:: https://uploads-ssl.webflow.com/5ac3c046c82724970fc60918/5c019d917bba312af7553b49_MacStadium-developerlogo.png
   :alt: MacStadium
   :target: https://www.macstadium.com/

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/altendky/pyqt-tools",
    "name": "pyqt5-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Kyle Altendorf",
    "author_email": "sda@fstab.net",
    "download_url": "",
    "platform": null,
    "description": "==========\npyqt-tools\n==========\n\n\n|PyPI| |Pythons| |GitHub|\n\nThe PyQt5 wheels do not provide tools such as Qt Designer that were included in\nthe old binary installers. This package aims to provide those in a separate\npackage which is useful for developers while the official PyQt5 wheels stay\nfocused on fulfilling the dependencies of PyQt5 applications.\n\nBoth Windows and Linux are supported.  Adjust paths etc accordingly if applying\nthe explanations below in Linux rather than Windows.  macOS support is\nincomplete but see `issue #12`_ if you want to discuss it.\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/pyqt5-tools.svg\n   :alt: PyPI version\n   :target: https://pypi.org/project/pyqt5-tools/\n\n.. |Pythons| image:: https://img.shields.io/pypi/pyversions/pyqt5-tools.svg\n   :alt: supported Python versions\n   :target: https://pypi.org/project/pyqt5-tools/\n\n.. |GitHub| image:: https://img.shields.io/github/last-commit/altendky/pyqt-tools/main.svg\n   :alt: source on GitHub\n   :target: https://github.com/altendky/pyqt-tools\n\n.. _`issue #12`: https://github.com/altendky/pyqt-tools/issues/12\n\n------------\nInstallation\n------------\n\n.. code-block:: powershell\n\n  yourenv/Scripts/pip.exe install pyqt5-tools~=5.15\n\nYou will generally install pyqt5-tools using ``pip install``.  In most cases\nyou should be using virtualenv_ or venv_ to create isolated environments to\ninstall your dependencies in.  The above command assumes an env in the\ndirectory ``yourenv``.  The ``~=5.15`` specifies a `release compatible with`_\n5.15 which will be the latest version of pyqt5-tools built for PyQt5_ 5.15. If\nyou are using a different PyQt5 version, specify it instead of 5.15.  PyPI\nkeeps a list of `all available versions`_.\n\n.. _virtualenv: https://virtualenv.pypa.io/en/stable/\n.. _venv: https://docs.python.org/3/library/venv.html\n.. _PyQt5: https://pypi.org/project/PyQt5/\n.. _`release compatible with`: https://www.python.org/dev/peps/pep-0440/#compatible-release\n.. _`all available versions`: https://pypi.org/project/pyqt5-tools/#history\n\nNote:\n    As of pyqt5-tools v3 the package has been broken down into four pieces.\n    The wrappers remain here but the plugins are located in pyqt5-plugins_,\n    some Qt application helpers in qt5-tools_, and the applications are in\n    qt5-applications_.\n\n.. _pyqt5-plugins: https://github.com/altendky/pyqt-plugins\n.. _qt5-tools: https://github.com/altendky/qt-tools\n.. _qt5-applications: https://github.com/altendky/qt-applications\n\n-----\nUsage\n-----\n\nA program is provided available as ``Scripts/pyqt5-tools.exe``.  There are\nsubcommands provided for each of Designer, QML Scene, and the QML Test Runner.\nThese wrapper commands provide additional functionality related to launching\nthe underlying programs.  A larger set of Qt application are available as\nsubcommands of the ``Scripts/qt5-tools.exe`` program.  In both cases, passing\n``--help`` will list the available subcommands.\n\nAdditionally, each ``pyqt5-tools`` subcommand listed below includes a parameter\nto run a basic example which can be used to see if the plugins are working.\nThese examples are `not` intended to be used as examples of good code.\n\nEach subcommand searches up the filesystem tree from your current\nworking directory to find a ``.env`` file and loads it if found.  If found, the\nenvironment variable ``DOT_ENV_DIRECTORY`` will be set to the directory\ncontaining the ``.env`` file.  With this extra variable you can specify paths\nrelative to the ``.env`` location.\n\n.. code-block:: powershell\n\n  PYQTDESIGNERPATH=${PYQTDESIGNERPATH};${DOT_ENV_DIRECTORY}/path/to/my/widgets\n\n\nDesigner\n========\n\nThere is a ``Scripts/pyqt5-tools.exe designer.exe`` entry point that will help fill out\n``PYQTDESIGNERPATH`` from either command line arguments or a ``.env`` file.\nUnknown arguments are passed through to the original Qt Designer program.\n\n.. code-block::\n\n    Usage: pyqt5-tools designer [OPTIONS]\n\n    Options:\n      -p, --widget-path DIRECTORY     Paths to be combined with PYQTDESIGNERPATH\n      --example-widget-path           Include the path for the pyqt5-tools example\n                                      button (c:\\users\\sda\\testenv\\lib\\site-\n                                      packages\\pyqt5_plugins)\n\n      --designer-help                 Pass through to get Designer's --help\n      --test-exception-dialog         Raise an exception to check the exception\n                                      dialog functionality.\n\n      --qt-debug-plugins / --no-qt-debug-plugins\n                                      Set QT_DEBUG_PLUGINS=1\n      --help                          Show this message and exit.\n\nIf you want to view the generated code from within Designer, you can\nrun ``Scripts/pyqt5-tools.exe installuic`` and it will copy ``pyuic6.exe``\nsuch that Designer will use it and show you generated Python code.  Note that\nthis will enable viewing using the C++ menu item while the Python menu item\nwill be broken.  Without having made this adjustment, the C++ option shows\nC++ code while the Python option shows PySide2 code.  ``pyqt5`` must already\nbe installed or this script will be unable to find the original ``pyuic6.exe``\nto copy.\n\nIn addition to the standard features of the official Designer plugin, this\nprovides an exception dialog for your widget's Python code.  Otherwise Designer\nin Windows silently crashes on Python exceptions.\n\nQML Plugin\n==========\n\nThe QML plugin is also included.  In the future a tool may be provided to\nhandle copying of the plugin to each directory where it is needed.  For now\nthis must be done manually.\n\n``site-packages/pyqt5_tools/Qt/bin/plugins/pyqt5qmlplugin.dll``\n\nQML Scene\n=========\n\n.. code-block::\n\n    Usage: pyqt5-tools qmlscene [OPTIONS]\n\n    Options:\n      -p, --qml2-import-path DIRECTORY\n                                      Paths to be combined with QML2_IMPORT_PATH\n      --qmlscene-help                 Pass through to get QML scene's --help\n      --qt-debug-plugins / --no-qt-debug-plugins\n                                      Set QT_DEBUG_PLUGINS=1\n      --run-qml-example               Run the pyqt5-tools QML example\n      --help                          Show this message and exit.\n\nQML Test Runner\n===============\n\n.. code-block::\n\n    Usage: pyqt5-tools qmltestrunner [OPTIONS]\n\n    Options:\n      -p, --qml2-import-path DIRECTORY\n                                      Paths to be combined with QML2_IMPORT_PATH\n      --qmltestrunner-help            Pass through to get QML test runner's --help\n      --qt-debug-plugins / --no-qt-debug-plugins\n                                      Set QT_DEBUG_PLUGINS=1\n      --test-qml-example              Test the pyqt5-tools QML example\n      --help                          Show this message and exit.\n\n\n--------------\nSpecial Thanks\n--------------\n\n|MacStadium|\n\n.. |MacStadium| image:: https://uploads-ssl.webflow.com/5ac3c046c82724970fc60918/5c019d917bba312af7553b49_MacStadium-developerlogo.png\n   :alt: MacStadium\n   :target: https://www.macstadium.com/\n\nThanks to MacStadium for providing me with a macOS system to develop and test\nout the final pyqt5-tools platform.  This is still 'in work'.  See\n`issue #12`_.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "PyQt Designer and QML plugins",
    "version": "5.15.9.3.3",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "117e3a5bce0e31650e091a16826d7a588be8bd56c2ac30871286b6c90d68ceeb",
                "md5": "1978f7b296f1a2a72ecc4e3246e369fb",
                "sha256": "4b45b26111c583a34fa364b98d7120f5aeca4f96ac72e251f1b37a9cca809f86"
            },
            "downloads": -1,
            "filename": "pyqt5_tools-5.15.9.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1978f7b296f1a2a72ecc4e3246e369fb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 29165,
            "upload_time": "2023-03-27T19:26:56",
            "upload_time_iso_8601": "2023-03-27T19:26:56.526178Z",
            "url": "https://files.pythonhosted.org/packages/11/7e/3a5bce0e31650e091a16826d7a588be8bd56c2ac30871286b6c90d68ceeb/pyqt5_tools-5.15.9.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-27 19:26:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "altendky",
    "github_project": "pyqt-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pyqt5-tools"
}
        
Elapsed time: 0.04857s