Qt World Summit: Register Today!

How to initialize the window size to span multiple screens

  • Currently it seems impossible to initialize a Window with a size greater than the current screen's size. Consider the MWE:

    import QtQuick 2.12
    import QtQuick.Window 2.12
    Window {
       visible: true
       width: Screen.desktopAvailableWidth
       height: 300
       title: "Hello world"
       onWidthChanged: console.log(width)

    With two full-HD screens (twice 1920px wide) the output is

    qml: 3840
    qml: 1920

    So basically the window is initialized to 3840px and then immediately resized down to Screen.width aka 1920px.

    I can however manually resize the screen to span multiple windows, why can't I do this programmatically?

Log in to reply