Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Do we still need to call XFlush in Qt 6?
Forum Updated to NodeBB v4.3 + New Features

Do we still need to call XFlush in Qt 6?

Scheduled Pinned Locked Moved Unsolved Game Development
4 Posts 3 Posters 822 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.
  • M Offline
    M Offline
    mhn2
    wrote on last edited by
    #1

    I was checking this old tutorial on how to create a SFML widget in qt, and in it there was this piece of code:

    // Under X11, we need to flush the commands sent to the server to ensure that
    // SFML will get an updated view of the windows
    #ifdef Q_WS_X11
        XFlush(QX11Info::display());
    #endif
    

    As I said this tutorial is pretty old and has not been update for a long time, and since then Qt has changed alot.
    I lack enough knowledge about the way Qt works behind the scenes so I have the following questions which I couldn't find a reliable answer to on the internet:

    • Do I still need to call XFlush in Qt6?
    • If yes, then how can I do it? The qx11info_x11.h header and the Q_WS_X11 macro that the tutorial was using don't seem to exist on qt anymore.

    Note: My current DE is using X11

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

      Hi and welcome to devnet,

      I would recommend asking the SFML folks, they will have more knowledge about that part.

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

        Hi, the reason I'm asking my question here is (as I stated in my question) your knowledge about the way Qt works behind the scenes. In the tutorial it was already stated that under X11, we need to call XFlush.

        My question here isn't trying to ask "Does SFML still require me to call XFlush", it's trying to ask:

        • Is Qt still using X11 for X11 DEs?
        • If yes what are the new alternatives to qx11info_x11.h & Q_WS_X11?

        Sorry if my first post wasn't clear enough about what my question actually is. But I don't think my questions are something that the SFML folks would necessary have enough knowledge about.

        J.HilkJ 1 Reply Last reply
        0
        • M mhn2

          Hi, the reason I'm asking my question here is (as I stated in my question) your knowledge about the way Qt works behind the scenes. In the tutorial it was already stated that under X11, we need to call XFlush.

          My question here isn't trying to ask "Does SFML still require me to call XFlush", it's trying to ask:

          • Is Qt still using X11 for X11 DEs?
          • If yes what are the new alternatives to qx11info_x11.h & Q_WS_X11?

          Sorry if my first post wasn't clear enough about what my question actually is. But I don't think my questions are something that the SFML folks would necessary have enough knowledge about.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @mhn2 afaik Q_WS_X11 was a Qt4 define, and was replaced by the much better Qt Platform Abstraction system.
          https://doc.qt.io/qt-6/qpa.html

          the x11 support still exists, you find that now here:
          https://doc.qt.io/qt-6/linux.html


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          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