Solved QQXcbConnection: Could not connect to display
-
I have created C++ console application to convert HTML to PDF using Qt WebKit. it is working fine when running the application using terminal. I have started the console application in web application using C#.
When I deploy it using nginx, it throws below error, QQXcbConnection: Could not connect to display .
Qt version: 5.5
OS: Ubuntu 16.04I have deploying the application in localhost.
Can anyone help me to resolve this?
-
@Shidharth Can you show the pro file?
-
I have set below ENVIRONMENT variable and it is working fine.
DISPLAY=:0.0;
XAUTHORITY='/home/username/.Xauthority';