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. Qt5: Does QScreen::virtualSiblings() guarantee the order of screens (needed to detect current screen)?
Forum Updated to NodeBB v4.3 + New Features

Qt5: Does QScreen::virtualSiblings() guarantee the order of screens (needed to detect current screen)?

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.2k Views 1 Watching
  • 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.
  • E Offline
    E Offline
    eliseev
    wrote on last edited by
    #1

    Hello,

    According to Qt5.0.0 documentation, screen returned by QWindow::screen() "does not change when the window is moved around virtual screen". That means, if QWindow is created on Display1 and then moved to Display2 - there is no way of telling it inside QWindow.

    The QScreen class provides list of its virtual siblings, however documentation does not specify in what order these siblings are. Can I rely that top-left screen will be at [0] and bottom-right at [count()-1]? If so, I can take QWindow::position() and sum screens' dimensions until I find the current one (in usual case there are only two displays, but systems with more than two are not unthinkable of).

    And this all is needed so call to showFullScreen() will expand the window onto current screen, not initial (primary?). Thus QWindow::setScreen() has to be called first with proper screen.

    I reported https://bugreports.qt-project.org/browse/QTBUG-29252 and https://bugreports.qt-project.org/browse/QTBUG-29251 in connection with this issue.

    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