Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt platform plugin xcb could not load - Qt6
Forum Updated to NodeBB v4.3 + New Features

Qt platform plugin xcb could not load - Qt6

Scheduled Pinned Locked Moved Solved Installation and Deployment
6 Posts 4 Posters 5.5k Views 2 Watching
  • 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.
  • R Offline
    R Offline
    ryan_rockhopper
    wrote on last edited by
    #1

    Hello all,

    I am new to both Ubuntu/Linux and Qt and I am trying to create my first Qt project. I am choosing a C++ Widget project with all of the default settings, and when I build I expected it to open a blank window (like it does on my Windows machine), however I get the following error. From my googling, it seems a library isn't linked? I'm not sure if that is the problem or what but I really don't know how to solve this. Any help would be appreciated.

    xcb_plugin.png

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Any chance you are running your desktop environment on top of Wayland ?

      If so, one thing you can do is to go in the Run part of the project panel and set the QT_QPA_PLATFORM environment variable to wayland and restart your application.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Paul ColbyP R 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Any chance you are running your desktop environment on top of Wayland ?

        If so, one thing you can do is to go in the Run part of the project panel and set the QT_QPA_PLATFORM environment variable to wayland and restart your application.

        Paul ColbyP Offline
        Paul ColbyP Offline
        Paul Colby
        wrote on last edited by
        #3

        Hi @ryan_rockhopper,

        This comes up quite often - try searching these forums for "xcb".

        That said, here's my go-to solution: @Paul-Colby said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

        qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

        For modern Ubuntu's, I resolve this with:

        sudo apt install libxcb-cursor0
        

        Cheers.

        R 1 Reply Last reply
        4
        • SGaistS SGaist

          Hi and welcome to devnet,

          Any chance you are running your desktop environment on top of Wayland ?

          If so, one thing you can do is to go in the Run part of the project panel and set the QT_QPA_PLATFORM environment variable to wayland and restart your application.

          R Offline
          R Offline
          ryan_rockhopper
          wrote on last edited by
          #4

          @SGaist

          Hi SGaist,

          How would I tell if I'm running my desktop environment on top of Wayland? Is that a setting in Ubuntu or some program/plugin that needs to be installed? Something else?

          Thanks,
          Ryan

          JoeCFDJ 1 Reply Last reply
          0
          • R ryan_rockhopper

            @SGaist

            Hi SGaist,

            How would I tell if I'm running my desktop environment on top of Wayland? Is that a setting in Ubuntu or some program/plugin that needs to be installed? Something else?

            Thanks,
            Ryan

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by
            #5

            @ryan_rockhopper
            echo $XDG_SESSION_TYPE

            1 Reply Last reply
            1
            • Paul ColbyP Paul Colby

              Hi @ryan_rockhopper,

              This comes up quite often - try searching these forums for "xcb".

              That said, here's my go-to solution: @Paul-Colby said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

              qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

              For modern Ubuntu's, I resolve this with:

              sudo apt install libxcb-cursor0
              

              Cheers.

              R Offline
              R Offline
              ryan_rockhopper
              wrote on last edited by
              #6

              @Paul-Colby said in Qt platform plugin xcb could not load - Qt6:

              sudo apt install libxcb-cursor0

              Thank you Paul-Colby, that totally fixed it. You're the man!

              1 Reply Last reply
              0
              • R ryan_rockhopper has marked this topic as solved on

              • Login

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