Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QQXcbConnection: Could not connect to display
Qt 6.11 is out! See what's new in the release blog

QQXcbConnection: Could not connect to display

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shidharth
    wrote on last edited by Shidharth
    #1

    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.04

    I have deploying the application in localhost.

    Can anyone help me to resolve this?

    jsulmJ 1 Reply Last reply
    0
    • S Shidharth

      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.04

      I have deploying the application in localhost.

      Can anyone help me to resolve this?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Shidharth Can you show the pro file?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Shidharth
        wrote on last edited by
        #3

        I have set below ENVIRONMENT variable and it is working fine.
        DISPLAY=:0.0;
        XAUTHORITY='/home/username/.Xauthority';

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved