Important: Please read the Qt Code of Conduct -

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

  • 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:


    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.

  • Lifetime Qt Champion


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

  • 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.setWindowFlags(window.windowFlags() | QtCore.Qt.Tool | QtCore.Qt.X11BypassWindowManagerHint)

    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

  • Lifetime Qt Champion

    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.

Log in to reply