run qml map app on server with no gui
-
Hi
I need to grab map image with route displayed on it and save this as a picture. It needs to be done by server application, so I have created another app and I'm running it inside QProcess of the server.
The problem is that if I run this process on Linux server without GUI I have this error:
"qt.qpa.screen: QXcbConnection: Could not connect to display \nCould not connect to any X display.\n"Has anyone some idea how to make it work, except for installing GUI on a server?
Best Regards
Marek -
Run your app with
-platform offscreen
flag. I'm not sure if it will allow you to actually grab an image of the scene (most probably not). -
So, you need the GUI stuff (or at least OpenGL) installed. Mind you, it does not mean that you need to have a display attached, it can still be a headless server. I think ;-)