Skip to content

PyQt Hidable Menubar (show/hide menu bar with close button at the right corner of it)

License

Notifications You must be signed in to change notification settings

yjg30737/pyqt-hidable-menubar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Usage

You can see the button at the right corner.

image

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.

image

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

image

Hiding state

image

Releases

No releases published

Packages

No packages published

Languages