Qt/Qml for two different displays on QNX platform -
I'm trying to create QT application rendering to display two. QNX2 is already configured for display. We created two windows, but how do we render the QT window in the second display?
Here is my code snippet
QGuiApplication app (argc, argv); QtQuick2ApplicationViewer Viewer1; QtQuick2ApplicationViewer Viewer2; in this(); Viewer1.setMainQmlFile (QStringLiteral ("qml / VisionBuck / main.qml")); Viewer1.showExpanded (); Viewer2.setMainQmlFile (QStringLiteral ("qml / VisionBuck / display2.qml")); Viewer2.showExpanded ();
In the output I can display 2 windows which displays QML. But they are being sung on the same display. How do I add windows to different screens?
QtQuick2ApplicationViewer
gets from QQuickView
And in this way from QWindow
You can set the screen for each viewer:
viewer1.setScreen (app.screens (). First ()); Viewer2.setScreen (app.screens ()) last ().);
Comments
Post a Comment