Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
5.0.2, 5.1.1
-
Mac 10.7
Description
Use widget with Qt::FramelessWindowHint and showMinimized() doesn't work. Code "works" on Qt 5.0.0 because FramelessWindowHint is not working. Window is not really frameless. And side note for Qt 5.0.0 that there's also issue that window is not restored from the dockbar when using FramelessWindowHint. That's related to QTBUG-25943.
Test application: press "minimize" button to minimize widget. Nothing happens. Remove Qt::FramelessWindowHint and works fine.
#include <QApplication> #include <QPushButton> class MyWidget : public QWidget { Q_OBJECT public: MyWidget() : QWidget(),minButton("minimize",this) { setWindowFlags( Qt::Window |Qt::FramelessWindowHint |Qt::WindowSystemMenuHint |Qt::WindowMinimizeButtonHint |Qt::WindowMaximizeButtonHint ); connect(&minButton,SIGNAL(clicked()),this,SLOT(minimize())); } public Q_SLOTS: void minimize() { showMinimized(); } private: QPushButton minButton; }; int main(int argc, char *argv[]) { QApplication a(argc, argv); MyWidget w; w.show(); return a.exec(); } #include "main.moc"
Attachments
Issue Links
- is duplicated by
-
QTBUG-44195 frameless window can't minimize or maximize on mac
-
- Closed
-
-
QTBUG-64994 CLONE - frameless window can't minimize or maximize on mac
-
- Closed
-
- relates to
-
QTBUG-45212 X11: cannot programmatically minimize a frameless window
-
- Reported
-