QtModularUiPack
A module for quick and easy creation of PyQt5 applications. Creating sophisticated and versatile user interfaces is a task which often involves a lot of effort. While in science and engineering there is often a lack of resources to invest in the development of user interface applications. This Python module aims to provide a very simple way of creating scale-able user interface applications. The module is based on the popular PyQt5 framework which is a Python wrapper based on the C++ library Qt5 (https://pypi.org/project/PyQt5/).
Installation
To install the module you can use the pip package installer for Python. Type the following command on the command line of your operating system:
pip install QtModularUiPack
First Steps
To check if the module is working properly open a python command prompt and type the following commands:
from QtModularUiPack.Widgets import ModularApplication
ModularApplication.standalone_application(title='MyApp', window_size=(640, 480))
This should produce a Qt user interface window with the title "MyApp" and the given size.
This empty window has a single button containing three dots. Clicking this button reveals a drop-down menu. Choose "View->Tool Command Line", this will change the window to a fully functional Python command prompt (ToolCommandFrame-widget).
The real power of the ModularApplication-widget lies in its ability to be subdivided and display different widgets simultaneously. To illustrate this again click the menu and then choose "split horizontally".
This will split the window and shows a new empty frame. In the new window choose "View->Hello World Frame". This will open the HelloWorldFrame-widget.
Some of the widgets in this module have the ability to access and change data in other widgets. One example of this is the ToolCommandFrame-widget on the left side of the window. Type the following in the command part of the widget:
tools.help()
This should show two items: console, hello_world. Both entries represent one found data-context in the ModularApplication-widget. The first entry "console" is the variable containing the data-context of the ToolCommandFrame-widget and "hello_world" contains the data-context of the HelloWorldFrame-widget. To access the HelloWorldFrame-widget type the following in the console:
tools.hello_world.switch()
Where "switch()" is a function provided by the data-context of the HelloWorldFrame-widget. Notice how the upper and lower text fields have swapped their contents.
This simple example serves to illustrate how modular applications can greatly simplify the communication between independent parts of an application. Lab automation which is a common subject in experimental science, this can be utilized to control mandy different devices while keeping the code for each device completely seperate. The ModularApplication-widget handles adding and removal of other widgets dynamically and notifies so called "context-aware" widgets about changes.
Advanced Topics
Metadata
Release files for QtModularUiPack 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| QtModularUiPack-0.0.7.tar.gz | 51.4 kB | Without provenance | Details for QtModularUiPack-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| QtModularUiPack-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for QtModularUiPack-0.0.7-py3-none-any.whl |
Total release size: 133.1 kB
Release files / QtModularUiPack-0.0.7.tar.gz
| Download URL | QtModularUiPack-0.0.7.tar.gz |
|---|---|
| Size | 51.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a6773c33d81f9b5c089cb8d60906fdb5c439ff2b6724ab77ee5c727bd55fcc0
|
|
BLAKE2b-256 checksum How to use checksums |
16cdf65748c573e1908db4dd735f3681c44ecbb9143766f9c2023e0883af145f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
|
Release files / QtModularUiPack-0.0.7-py3-none-any.whl
| Download URL | QtModularUiPack-0.0.7-py3-none-any.whl |
|---|---|
| Size | 81.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd1f295fac2d9349af96d44948f3f0949ca281d0feb6e161aae07cea12f2e9de
|
|
BLAKE2b-256 checksum How to use checksums |
9b2172ede87e122ed398dc0c239e783dd3eab2e8c97a4915d477d08e1be55a6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
|
Security for QtModularUiPack 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.