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. qt.move doesn't work on linux XFCE and macos

qt.move doesn't work on linux XFCE and macos

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

    Hi,

    I have some qt widgets running inside another cross-platform app. So everything works great on Windows, and linux but I have seen some strange behaviour on some OSes like macos and linux XFCE.

    The simplest issue I have is that calling:

    widget.move(-10000,-10000)

    the widget fails to move.

    I even tried move(300, 300) on linux XFCE but it just didn't move.

    widget.hide/show works. But I also need to move and resize my window.

    My window has a tool flag and it's set to show as fullscreen though it doesn't cover the entire screen. It works fine anyway on other OSes.

    Are these known issues like this on the above platforms I listed?

    Thanks in advance.

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

      Hi,

      Can you provide a minimal compilable example that reproduce that behaviour ?

      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
      • L Offline
        L Offline
        lachdanan
        wrote on last edited by lachdanan
        #3

        Hi, I am debugging this on someone else's system by asking him to try some code, but something like this should work:

        from PySide2 import QtCore, QtWidgets, QtGui
        
        window = QtWidgets.QWidget()
        window.resize(1500, 1500)
        window.setWindowFlags(window.windowFlags() | QtCore.Qt.Tool)
        window.show()
        #window.setWindowFlags(window.windowFlags() | QtCore.Qt.Tool | QtCore.Qt.X11BypassWindowManagerHint)
        
        window.move(-1000,-1000)
        

        On Windows this, works, but on linux XFCE, the window is trying to move outside the screen but can't. That commented line seems to fix the issue of moving outside the screen, but there still seems to be some glitches like I ask the window to move somewhere it seems to move there but there is a gap from the actual location I move the dialog, so not sure what's going on.

        Also does this forum software has issues? Anyone I want to reply, I only see a tiny line that's really uncomfortable to reply, so I have to zoom out super far :(

        alt text

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

          What version of PySide2 are you using ?
          Based on what version of Qt ?
          Note that maybe some of the window manager might block moving outside of the visible screen as it could mean that you can't access your window anymore and if later on you restart your application with a window outside of the "usable area", you won't be able to access it.

          As for the forum, I can't tell. I have a normal sized text box. What you can do is use the double sided arrow on the left to make that part bigger.

          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