Reputation: 656
I have hybrid QML/QWidget application and I want to show QML window on the specified screen. Here's the code defining a screen number
int activeScreenIndex = QApplication::desktop()->screenNumber(QApplication::activeWindow());
Now I want to show QML component Window
on the screen I've defined this way. Another problem is that I create QML windows unisng Instantiator
.
Upvotes: 1
Views: 2267
Reputation: 5836
Window::screen
was introduced in Qt 5.9.
Window {
screen: Qt.application.screens[activeScreenIndex]
}
Upvotes: 3