Qt objects which requires X11 server
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 ?
Re: Qt objects which requires X11 server
The documentation of each class specifies to which module the class belongs. Alternatively, you can get a list of all Qt classes by module. 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.
Re: Qt objects which requires X11 server
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.
Re: Qt objects which requires X11 server
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,
_
Re: Qt objects which requires X11 server
If all else fails you can fake an X server with Xvfb, but that requires some external fooling about.
Re: Qt objects which requires X11 server
Thanks for your replies, I will continue check documentation and test Xvfb.