1

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.

1 Answer 1

3

Window::screen was introduced in Qt 5.9.

Window { screen: Qt.application.screens[activeScreenIndex] } 
Sign up to request clarification or add additional context in comments.

2 Comments

I've installed Qt 5.9 with MinGW 5.3.0, but I'm gettings invalid property name "screen" error and screen is underlined. Component not ready printed when I start the application. What's wrong?
Documentation says that import QtQuick.Window 2.2 but import QtQuick.Window 2.3 fixed this problem

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.