Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to initialize the window size to span multiple screens
Forum Updated to NodeBB v4.3 + New Features

How to initialize the window size to span multiple screens

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 260 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stabbles
    wrote on last edited by stabbles
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved