PDA

View Full Version : Qt objects which requires X11 server



CloudCompany
21st December 2015, 10:38
Hello everyone!

I'm currently building an API for a software which can be launched on a Console.
This API use some part of code which is used in the GUI version, and the API fails sometimes because it needs an X11 server.
My question is: Which Qt libraries/objects needs an X11 server ?

For example, I changed all QPixmap objects into QImage because QImage does not need an X11 server.
Do you know if a list of these objects exists ?

yeye_olive
21st December 2015, 11:35
The documentation of each class specifies to which module the class belongs. Alternatively, you can get a list of all Qt classes by module (http://doc.qt.io/qt-5/modules-cpp.html). For a console application, stay clear of every GUI-related module, such as GUI, Widgets, QtQuick, etc. As long as you RTFM of each class you use, it will be easy to sort them out.

CloudCompany
21st December 2015, 15:25
Thanks for your reply.

I was searching in the documentation before create this topic.
I thought that there was a cheat sheet on this subject, but I am wrong.

anda_skoa
21st December 2015, 17:25
Classes from QtCore never need any graphics system resources.
Classes from QtGui might.
With Qt5 one can also use a platform plugin that does not use X11 and then use almost all of QtGui

Cheers,
_

ChrisW67
21st December 2015, 19:45
If all else fails you can fake an X server with Xvfb, but that requires some external fooling about.

CloudCompany
22nd December 2015, 09:12
Thanks for your replies, I will continue check documentation and test Xvfb.