Do we still need to call XFlush in Qt 6?
-
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 theQ_WS_X11
macro that the tutorial was using don't seem to exist on qt anymore.
Note: My current DE is using X11
-
Hi and welcome to devnet,
I would recommend asking the SFML folks, they will have more knowledge about that part.
-
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.
-
@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.htmlthe x11 support still exists, you find that now here:
https://doc.qt.io/qt-6/linux.html