Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-foldable-toolbar
PyQt foldable/hidable toolbar
https://github.com/yjg30737/pyqt-foldable-toolbar
pyqt pyqt-examples pyqt-gui pyqt-tutorial pyqt5 pyqt5-examples pyqt5-gui pyqt5-tutorial python python3 python37 qpushbutton qt qtoolbar
Last synced: about 1 month ago
JSON representation
PyQt foldable/hidable toolbar
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-foldable-toolbar
- Owner: yjg30737
- License: mit
- Created: 2022-03-10T04:42:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-18T04:42:29.000Z (over 2 years ago)
- Last Synced: 2024-12-27T05:30:14.443Z (about 2 months ago)
- Topics: pyqt, pyqt-examples, pyqt-gui, pyqt-tutorial, pyqt5, pyqt5-examples, pyqt5-gui, pyqt5-tutorial, python, python3, python37, qpushbutton, qt, qtoolbar
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-foldable-toolbar
PyQt foldable/hidable toolbar. You can add widget with `addWidget(widget)`. You can see how to use it in the example below.There is fold/unfold animation to make it look better.
## Requirements
* PyQt5 >= 5.8## Setup
`python -m pip install pyqt-foldable-toolbar`## Included Packages
* pyqt-svg-button## Example
### Code Sample
```python
from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit
from pyqt_foldable_toolbar import FoldableToolBarif __name__ == "__main__":
import sysapp = QApplication(sys.argv)
mainWindow = QMainWindow()
toolBar = FoldableToolBar()
toolBar.addWidget(QTextEdit())
mainWindow.addToolBar(toolBar)
mainWindow.show()
sys.exit(app.exec_())
```### Result
Unfold
![image](https://user-images.githubusercontent.com/55078043/157591512-9654f7c5-b852-48f9-95bf-2ac22baa182b.png)
Fold
![image](https://user-images.githubusercontent.com/55078043/157591529-2b1ccbb9-5f9b-4342-a52b-d4d48e7e15c5.png)
Here's another example with `SettingsDialog` in pyqt-timer.
Unfold
![image](https://user-images.githubusercontent.com/55078043/168452297-8bdce2f0-3126-4a83-8dee-c4ffd932ac4d.png)
Fold
![image](https://user-images.githubusercontent.com/55078043/168452302-aae84399-aa3b-4e5d-bcef-1b8cbf682ba8.png)