Use qGuiApp instead of qApp

As QtQuick applications might not have QApplication.
This commit is contained in:
Sergio Martins
2022-06-06 13:21:35 +01:00
parent 995df8e3e8
commit 5faf36700b
24 changed files with 72 additions and 68 deletions

View File

@@ -135,7 +135,7 @@ void ObjectViewer::dumpWindows()
}
qDebug() << "Top Level Windows:";
const auto &topLevelWindows = qApp->topLevelWindows();
const auto &topLevelWindows = qGuiApp->topLevelWindows();
for (QWindow *w : topLevelWindows) {
qDebug() << " QWindow=" << w << "; parent=" << w->parent() << "; transientParent=" << w->transientParent() << "; hwnd=" << w->winId();
}