Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.3.0
-
None
-
3481db791c3b48e28f1a9531b247adf6562edb71
Description
QApplication::topLevelWidgets() will return various internal widgets. These will be different from platform to platform.
Since the function already takes care of removing QDesktopWidgets from the list it seems reasonable that it should remove all the others as well.
#include <QApplication> #include <QWidget> #include <QDebug> int main (int argc, char* argv[]) { QApplication app(argc, argv); for (int i=0; i<4; ++i) { QWidget* w = new QWidget(); w->setWindowTitle(QString("My Widget %1").arg(i)); w->move(410*i, 32); w->resize(400, 300); w->show(); } app.processEvents(); foreach (QWidget* w, qApp->topLevelWidgets()) { qDebug() << "Top Level = :[[" <<w <<"]] Visible ? = ["<< w->isVisible(); } return app.exec(); }