mopyx utilities when working with PySide2 (the official Qt5 python bindings)
Installation
pip install mopyx_pyside2
API
create_qt_application() → create a Qt5 application.
create_qt_tray_icon() → create a systray icon.
ui_thread_call(f, args, kw) → invoke a function on the Qt’s UI thread.
ui_thread(f) → make the function invokable on the Qt’s UI thread.
show_notification(title: str, message: str, icon: QIcon, delay: int = 4000) → shows a notification on the systray.
clear_layout(layout: QLayout) → clear the layout.
_(f) → create a callable that ignores all its parameters, and invokes the callable given as an argument.
Sample
How to call functions from a different thread, still accessing the UI:
@ui_thread
@action
def update_failed_count(job, successful: bool) -> None:
# ...
@ui_thread
@action
def update_results(job, result) -> None:
# ...
class JobMonitorThread(threading.Thread):
def run(self) -> None:
try:
# do something
except Exception:
update_failed_count(job, False)
else:
update_results(job, ...)
time.sleep(10)
Metadata
Release files for mopyx_pyside2 1.0.0
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 |
|---|---|---|---|---|
| mopyx_pyside2-1.0.0.tar.gz | 2.6 kB | Without provenance | Details for mopyx_pyside2-1.0.0.tar.gz |
Release files / mopyx_pyside2-1.0.0.tar.gz
| Download URL | mopyx_pyside2-1.0.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1f087d9a205c8f638368e888d81dae6a7584b55974b4a62a678376d8a24cb53
|
|
BLAKE2b-256 checksum How to use checksums |
93b9e8957d86f389f89761bf65b73c4b91e4d8f61e1f19a54faaed7148a64466
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.8
|
Security for mopyx_pyside2 1.0.0
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.