Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.11.2
-
None
Description
... but it works when changing the code as follows (inspired by how SDDM does it, as SDDM happened to work):
- QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
+ QList<QScreen *> screens = qGuiApp->primaryScreen()->virtualSiblings();
+ QScreen * screen(screens[0]);
+ QQuickView *view = new QQuickView();
+ view->setScreen(screen);
+ view->setResizeMode(QQuickView::SizeRootObjectToView);
+ view->setGeometry(screen->geometry());
+ view->setSource(QUrl(QStringLiteral("qrc:/qml/main.qml")));
+ view->show();
+ view->requestActivate();
(and of course adjusting the QML to not use an ApplicationWindow but something else).
I don't know what is the problem but I have my workaround and won't spend more time diagnosing.
Best regards,