pyqt-foldable-toolbar

PyQt foldable toolbar


Keywords
pyqt, pyqt-examples, pyqt-gui, pyqt-tutorial, pyqt5, pyqt5-examples, pyqt5-gui, pyqt5-tutorial, python, python3, python37, qpushbutton, qt, qtoolbar
License
MIT
Install
pip install pyqt-foldable-toolbar==0.0.11

Documentation

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

Example

Code Sample

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

image

Fold

image

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

Unfold

image

Fold

image