pyqt-hidable-menubar
PyQt Hidable Menubar (show/hide menu bar with close button at the right corner of it)
Showing/hiding menu bar performs little animation.
Fully-responsive as well.
Requirements
- PyQt5 >= 5.8
Setup
pip3 install git+https://github.com/yjg30737/pyqt-hidable-menubar.git --upgrade
Included Packages
- pyqt-svg-icon-pushbutton - To svg file button (close button's icon is svg file)
Usage
You can see the button at the right corner.
If you click it, menu bar will be hidden but not completely(small space remains).
If you want to show it again, just move the mouse cursor to the space.
Example
Code Sample
from PyQt5.QtWidgets import QApplication, QMainWindow, QMenu
from pyqt_hidable_menubar import HidableMenuBar
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
mainWindow = QMainWindow()
hidableMenuBar = HidableMenuBar()
fileMenu = QMenu('File', mainWindow)
hidableMenuBar.addMenu(fileMenu)
mainWindow.setMenuBar(hidableMenuBar)
mainWindow.show()
app.exec_()
Result
Showing state
Hiding state