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 year 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 (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-18T04:42:29.000Z (about 4 years ago)
- Last Synced: 2025-05-07T11:14:42.460Z (about 1 year 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 FoldableToolBar
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
mainWindow = QMainWindow()
toolBar = FoldableToolBar()
toolBar.addWidget(QTextEdit())
mainWindow.addToolBar(toolBar)
mainWindow.show()
sys.exit(app.exec_())
```
### Result
Unfold

Fold

Here's another example with `SettingsDialog` in pyqt-timer.
Unfold

Fold
