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. Window dragging between two monitors with a different resolutions.
Forum Update on Monday, May 27th 2025

Window dragging between two monitors with a different resolutions.

Scheduled Pinned Locked Moved Unsolved General and Desktop
framelesswindowdraggingwindows
2 Posts 2 Posters 707 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.
  • N Offline
    N Offline
    nen777w
    wrote on last edited by
    #1

    Here is the link to simple project: https://ufile.io/d4ysa
    The main window with a system title bar which is contains the green label (in menu bar) which is allow drag the main window.
    The code for that implemented in QExtBodyMoveWidget.h file

    The problem is following:
    The exist a difference between how you dragging this window between two monitors (I tested in under Windows) using green label or system title bar.
    In first case:
    If you drag this window using green label, the window switch early to another resolution, and jump far from from the mouse cursor.
    In second case:
    But if you drag it using system title bar, the window switch to another resolution in time and do not shifted related to mouse cursor.

    Is it possible to "emulate" the same behavior for the first case?
    I suppose that I need to using some Win API for the window settings?

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

      Hi,

      An educated guess is that the second case is handled by the window manager (the decoration is not done by Qt).

      One possible thing to do would be to check the screen resolution in your method and try to adapt to that.

      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