mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 11:22:24 +02:00
Search main window by checking object name
This commit is contained in:
parent
9e156deaab
commit
77ef0e05a1
1 changed files with 1 additions and 2 deletions
|
@ -625,8 +625,7 @@ private:
|
||||||
auto windows = qApp->topLevelWindows();
|
auto windows = qApp->topLevelWindows();
|
||||||
QWindow* result = nullptr;
|
QWindow* result = nullptr;
|
||||||
for (auto window : windows) {
|
for (auto window : windows) {
|
||||||
QVariant isMainWindow = window->property("MainWindow");
|
if (window->objectName().contains("MainWindow")) {
|
||||||
if (!qobject_cast<QQuickWindow*>(window)) {
|
|
||||||
result = window;
|
result = window;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue