mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 12:24:29 +02:00
Merge pull request #12498 from vladest/fix_crash_startup
Search main window by checking object name
This commit is contained in:
commit
d60d8fe702
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