Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Qt5.2 Multi-Screen Support for QWidget on Macs coordinate problem

[Solved] Qt5.2 Multi-Screen Support for QWidget on Macs coordinate problem

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.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.
  • T Offline
    T Offline
    tk.fs
    wrote on last edited by
    #1

    We're currently porting an application from Qt4.8 to 5.2 and ran into a major problem with Mac multi screen support. We use transparent overlay windows (QWidget based) that can be moved around by the user. With Qt4.8 moving from one screen to another was no problem. Qt5.2 however does not translate the change in coordinate system between the screens correctly and the window "suddenly" jumps up or down when moving to the other screen.

    On a Mac screens can be "adjusted" in relation to each other. Putting a larger and a smaller display next to each other you can tell to OS that the smaller displays top is somewhere in the middle of the larger display. When a window is now dragged from the larger to the smaller display it shows up at the same y-position on both screen, although in reality they are different. This is managed in Qt with QScreen and recognized correctly.

    However when positioning a QWidget with move or setGeometry this information is ignored in Qt5.2 - so the Window drops much further when moving from one screen to another. In Qt4.8 this was compensated by the Qt library.

    This wouldn't be so bad it there was any chance to find out which screen a QWidget is on and get a signal on screen change to compensate manually - however I did not find anything that could provide this information.

    Is there a possibility to get informed (SIGNAL) when a QWidget switches to a new screen? Is this change in behavior between Qt4.8 intended or a bug? Or does any of you see a different approach to move a transparent window around between screen?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It sounds like it could be a regression. Did you look at the "bug report system":http://bugreports.qt-project.org to see if it's something known ? If not, you should open a new report providing a minimal compilable sample program that shows the behavior

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tk.fs
        wrote on last edited by
        #3

        Samuel, thanks for the hint! Checked with the current GIT repository. This is a regression that will be fixed with the 5.2.1 build. Thanks!!!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          Can you post the link to the related bug ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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