Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.7.1, 4.7.2, 4.7.3
-
None
-
Windows 7 x64, Windows XP, MinGW 4.4
Description
I'm compiling my Qt app on Windows 7 using Qt 4.7.2 and MinGW 4.4. I use QWidget::isActiveWindow() and it turns out that when I minimize a window by clicking on its entry in the taskbar, Qt thinks the window is still active but at the same time it knows it's minimized. I reproduced this issue also on Windows XP using Qt 4.7.1.
The problem is easily reproducible in the following app. Note that minimizing the window by clicking on "_" button on its decoration gives correct results.
#include <QtCore/QDebug> #include <QtCore/QTimer> #include <QtGui/QApplication> #include <QtGui/QWidget> class Widget : public QWidget}} { Q_OBJECT QTimer m_timer; public: Widget() { m_timer.setInterval(500); m_timer.setSingleShot(false); connect(&m_timer, SIGNAL(timeout()), SLOT(onTimer())); m_timer.start(); } public slots: void onTimer() { qDebug() << "isActiveWindow():" << isActiveWindow() << ", isMinimized():" << isMinimized(); } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); Widget w; w.show(); return app.exec(); } #include "moc_main.cxx"
Attachments
Issue Links
- replaces
-
QTBUG-36806 Windows: When minimizing a Qt application by click on icon in MS windows taskbar main window still return true from isActiveWindow
- Closed