Qt5 QX11Info::display()?
-
Thank you kindly :)
[quote author="flim" date="1347884378"]zester: A workaround to get a Xlib Display:
@
#include <qpa/qplatformnativeinterface.h>// ...
QWindow window = new QWindow(/ screen */);
Display *display = static_cast<Display *>(qGuiApp->platformNativeInterface()->nativeResourceForWindow("display", window->windowHandle()));
// ...
@Edit: Forgot to mention that you need to add gui-private to QT (like: QT += core gui gui-private)
or:
@
#include "PATH_TO_QT5DIR/qtbase/src/plugins/platforms/xcb/qxcbscreen.h"// ...
QList<QScreen *> screens = QGuiApplication::screens();
QXcbScreen *xcbscreen = static_cast<QXcbScreen *>(screens.at(0)->handle());
Display *display = static_cast<Display *>(xcbscreen->connection()->xlib_display());// ...
@[/quote] -
[quote author="zester" date="1347882957"]
And this is why, my friends, we don't have a Linux desktop. At
some point, we need get some stability and backwards
compatibility in our GUI toolkits. Otherwise, we see this problem
over and over again - GUI API updates break application
developers, and those developers have to put time and effort into
restoring functionality rather than adding new features or
improving usability.
Windows will happily run 10 year old GUI code. OSX will still run
7 year old GUI code. But Linux? Depending on the which window
manager you're using, even 2-3 year old code can be horribly
broken by API updates. As a developer, this is one of the chief
reasons I'm considering abandoning Linux and moving to OSX.
It's just too bothersome to deal with the ever-increasing flux in
Linux GUI libraries.[/quote]
I can't see how this could be true. Qt 5 tries to minimize source incompatibilites w.r.t. Qt 4. Qt 4 has been around for 7 years now and won't go away in the next few years. This means that your Qt 4 + XLib application will have ~10 years of supported, working lifespan.
-
Couldnt just let me go in piece could you peppe? He wasnt talking about Qt in particular but linux as a whole and it happens constantly. Example??? Try to compile the newest gimp from src some time and see if it needs a version of gtk or its libs that you dont have. But if you need a Qt example well what do you think this whole topic was about? And it might just be cultural differances but here in the usa if you break something its your responsability to eather fix or replace it. If I had a commercial licenses and digia was a us company you could have been witness to that in effect. It doesnt matter that Qt4 will be around I had an expectation of porting to Qt5 without huge amounts of diffaculte and Qt/Nokia promised an easy transition from Qt4 to Qt5 with minimal breakage but thats not what heppend because non-of my Qt4 apps compile in Qt5 out of the box, Its going to cost me huge amounts of time to get this stuff ported to Qt5. Because there are lots of missing pieces now.
[quote author="peppe" date="1347892099"]
[quote author="zester" date="1347882957"]
And this is why, my friends, we don't have a Linux desktop. At
some point, we need get some stability and backwards
compatibility in our GUI toolkits. Otherwise, we see this problem
over and over again - GUI API updates break application
developers, and those developers have to put time and effort into
restoring functionality rather than adding new features or
improving usability.
Windows will happily run 10 year old GUI code. OSX will still run
7 year old GUI code. But Linux? Depending on the which window
manager you're using, even 2-3 year old code can be horribly
broken by API updates. As a developer, this is one of the chief
reasons I'm considering abandoning Linux and moving to OSX.
It's just too bothersome to deal with the ever-increasing flux in
Linux GUI libraries.[/quote]
I can't see how this could be true. Qt 5 tries to minimize source incompatibilites w.r.t. Qt 4. Qt 4 has been around for 7 years now and won't go away in the next few years. This means that your Qt 4 + XLib application will have ~10 years of supported, working lifespan.[/quote]
-
All my concerns and expectaions are or have been addressed thank you for that, I no longer have an issues with the Qt dev team or Digia.
My last remaining issue is with the devs of xcb it self, and I will be starting a campain and gathering support to force them to document there api's and at the least begin on some tutorials. Being that they appear to be a major player now in the linux community they have an oblagation to fullfill. 11 years ago they were rejected by the x team but they were able to gather enought support from the community to make the push, they set the tone and there were expecations for the support that got them were they are today.
-
Just a note for anyone looking at this thread in future. The Qt X11 extras module now exists and can be found at https://qt.gitorious.org/qt/qtx11extras