pyqt-drawer
PyQt drawer.
You can set the widget to drawer.
Opening, closing drawer involved animations of size change and drawer/parent window's opacity.
Requirements
PyQt5 >= 5.8
Setup
python -m pip install pyqt-drawer
Included Packages
Feature
-
Drawer(parent, widget: QWidget, orientation)Constructor.-
parentis parent window. -
widgetis the widget you want to set in the drawer. -
orientationis orientation of drawer. Available values are Qt.Horizontal, Qt.Vertical.
-
-
Being able to set size/opacity duration with
drawer.setDuration(msc) -
Being able to set end size value with
drawer.setEndValue(size).
Example
Code Example
from PyQt5.QtWidgets import QMainWindow, QListWidget, QApplication, QWidget, QGridLayout
from pyqt_drawer.drawer import Drawer
from pyqt_timer.settingsDialog import SettingsDialog
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
listWidget = QListWidget()
listWidget.addItems(
['Age of Empires II: Definitive Edition', 'American Truck Simulator', 'Arma 3', "Assassin's Creed"])
drawer = Drawer(self, listWidget) # widget to show/hide
drawer.setDuration(200) # set duration (200 milliseconds)
drawer.setEndValue(listWidget.sizeHint().width()) # set end value with listWidget's appropriate maximum width
lay = QGridLayout()
lay.addWidget(SettingsDialog(), 0, 0, 1, 1)
lay.addWidget(drawer, 0, 0, 1, 1)
lay.setContentsMargins(0, 0, 0, 0)
mainWidget = QWidget()
mainWidget.setLayout(lay)
self.setCentralWidget(mainWidget)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
app.exec_()
Result
Metadata
Release files for pyqt-drawer 0.0.17
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 |
|---|---|---|---|---|
| pyqt-drawer-0.0.17.tar.gz | 4.3 kB | Without provenance | Details for pyqt-drawer-0.0.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyqt_drawer-0.0.17-py3-none-any.whl | Python 3 | none | any | Details for pyqt_drawer-0.0.17-py3-none-any.whl |
Total release size: 9.5 kB
Release files / pyqt-drawer-0.0.17.tar.gz
| Download URL | pyqt-drawer-0.0.17.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d38b6cdfbae0dac013878eb889830905101814c377d6f7c3e8f1db893c301271
|
|
BLAKE2b-256 checksum How to use checksums |
5d1046399eb0c1356bc2e95cee848f55d2c07d0cb2df7358b937b111fff9ea25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.7.6
|
Release files / pyqt_drawer-0.0.17-py3-none-any.whl
| Download URL | pyqt_drawer-0.0.17-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f1cf3490bef6000cbb1c5f63ebcf70a19aaa0f2dbd21a30f9ca286edfe567e2
|
|
BLAKE2b-256 checksum How to use checksums |
67f55486b36dd3eacbbbf8611c93cca19253882bbd3c021187bce2aff456846c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.7.6
|
Security for pyqt-drawer 0.0.17
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.