C++ – Qt C++ minimize and maximize window

cqt

I create main window by using class QWidget and setup window flag to Qt::CustomizeWindowHint (to disable title bar). But than I found problem – when I click on my program button on Windows taskbar – program won't minimize and maximize. What can I do to remove this problem? I use Windows 7. Sorry 4 my bad english.

Best Answer

That's the feature of Qt::CustomizeWindowHint.When use this windows flag,you can hardly control the window.What you can try is adding two buttons to your window and connect them to showMaximized() and showMinimized().Then you can maximize or minimize the window by clicking the buttons.