My program can run on a server without a GUI or on the desktop. When it runs on a system that can display graphical interfaces, I want to create a QApplication instance, and when it is on the server, I want QCoreApplication.
If I initiate QApplication on the server, it is either Segfault (at least it used) or it displays an error message and shuts down, preventing me from creating a QCoreApplication instance instead:
This application could not be started because it could not find or download the Qt platform plugin "xcb". Platform plugins available: linuxfb, minimal, off-screen. Reinstalling the application may fix this problem.
Seriously?
Currently, I just pass the -noGui argument when I run my program on the server. It works fine, but I want to determine if the system can use QApplication or not, so I can get rid of this argument.
I am sure that there is already an answer to something, but I canβt work with him.
source
share