PyQt foldable window
I will add this feature to pyqt-custom-titlebar-window.
Even though this included aforementioned package.
PyQt5 >= 5.8
pip3 install git+https://github.com/yjg30737/pyqt-foldable-window.git --upgrade
- Being able to fold, unfold window by toggle button on the menu bar
- Being able to move the window with dragging menu bar
from PyQt5.QtWidgets import QApplication, QMainWindow, QMenu
from pyqt_foldable_window import FoldableWindow
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
fileMenu = QMenu('File', self)
self.menuBar().addMenu(fileMenu)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
window = FoldableWindow(MainWindow())
window.show()
app.exec_()
Result
Note: Preview below is very first version. Current version(0.3.0) icons are svg, so they are not blurry anymore.
Unfolded state
Folded state
FoldableWindow
's argument should be only QMainWindow
kind of class that QMenuBar
exists. If that is not exist, error will occur.