PyQt drawer
Project description
pyqt-drawer
PyQt Drawer
Requirements
PyQt5 >= 5.8
Setup
python -m pip install pyqt-drawer
Included Packages
Feature
-
Drawer(widget: QWidget, orientation)
Constructor. Default orientation is set to Qt.Horizontal. Giving Qt.Vertical is enabled, but not recommended. (There is a bug related to vertical animation starting point, i will fix it) -
Being able to set duration with
drawer.setDuration(msc)
-
Being able to set end value with
drawer.setEndValue(size)
Example
Code Example
from PyQt5.QtWidgets import QMainWindow, QListWidget, QApplication
from pyqt_drawer.drawer import Drawer
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(listWidget) # widget to show/hide
drawer.setDuration(200) # set duration (200 mseconds)
drawer.setEndValue(listWidget.sizeHint().width()) # set end value with listwidget's appropriate maximum width
self.setCentralWidget(drawer)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
app.exec_()
Result
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 Distribution
pyqt-drawer-0.0.11.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for pyqt_drawer-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0473f80966befc790901c24bb1e2cecfd9d3abc0431c778567f29dfe2b4e82c |
|
MD5 | e628c437dd34e5c45f5c51d30c716c2b |
|
BLAKE2b-256 | 4e6e2652561f72541a9e24be2bb703b1b9dcec36e5dce29af1ef2b974c661d69 |