X11: Opening QWidget in a separate XScreen



  • Hi,

    If a Qt application is opened in xscreen ":0.0", is it possible for that application instance to open a QWidget in a different xscreen (in, say, ":0.1")

    At the X windowing API, this would map to to calling Xlib's XOpenDisplay() function with a certain display name when creating the QWidget.

    Does Qt have this possibility?

    Regards,

    Sampsa


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Do you mean move the widget to one of the desktop returned by QDesktopWidget ?



  • Hi,

    I have used QDesktopWidget before to move windows between different screens (inside the same xscreen).

    Now that I read the class description again, it does say that QDesktopWidget should work for "multiple desktops" as well.. But "multiple desktops" may refer to either multiple desktops on a single "macro" xscreen (i.e. at :0.0) or to desktops on different xscreens (i.e. :0.0 and :0.1)

    Here are some relevant posts that I found:

    http://www.qtcentre.org/threads/64782-Mapping-QScreen-to-X11-display-number
    https://bugreports.qt.io/browse/QTBUG-45485
    https://bugreports.qt.io/browse/QTBUG-48545

    I guess there is only one way to find out: trying QDesktopWidget with multiple xscreen configured and see if it works.

    .. however, I wanted to know a-priori, if this is possible in Qt, before starting to tweak with "xorg.conf". Trying to configure multiple xscreens for the nouveau graphics driver is such a pain these days..

    Regards,

    Sampsa



  • @ElSampsa said in X11: Opening QWidget in a separate XScreen:

    Trying to configure multiple xscreens for the nouveau graphics driver is such a pain these days..

    But you can use graphics driver instead of nouveau... :)


Log in to reply