I am trying to create a Qt application rendering for two displays. QNX is already configured for two displays. We created two windows, but how can we tell Qt to display the window on a second display?
Here is my code snippet
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer1;
QtQuick2ApplicationViewer viewer2;
init();
viewer1.setMainQmlFile(QStringLiteral("qml/VisionBuck/main.qml"));
viewer1.showExpanded();
viewer2.setMainQmlFile(QStringLiteral("qml/VisionBuck/display2.qml"));
viewer2.showExpanded();
At the output, I can see 2 windows displaying QML. But they are displayed on one display. How to attach windows to different screens?
source
share