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.1.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for pyqt_drawer-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afa011d92fe0609d20825832b7fbea96a0d40d6db79b785c4ecca2cdb9019820 |
|
MD5 | 2bed265e6a1b72b77b22f0d2efee24be |
|
BLAKE2b-256 | d9092f60c062756de6304850d500b4373671b48c796a0ded9b40ff27dc264457 |