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. Qt6Gui could not be found
Forum Update on Tuesday, May 27th 2025

Qt6Gui could not be found

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 3.0k Views 1 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
    Rocky Plantchair
    wrote on last edited by Rocky Plantchair
    #1

    Hi,
    it is a fresh QtCreator installation on Kubuntu 23.10. I guess that I need to set up some environment variables, but I am not sure what and where.

     /home/.../Qt/6.6.1/gcc_64/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake
    
    but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be
    NOT FOUND.  Reason given by package:
    
    Qt6Gui could not be found because dependency WrapOpenGL could not be found.
    
    Configuring with --debug-find-pkg=WrapOpenGL might reveal details why the
    package was not found.
    
    Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
    of the path variables that find_package uses to try and find the package.
    
    Stos wywołań:
    /home/.../test/CMakeLists.txt:9 (find_package)
    /home/.../Programy/Qt/6.6.1/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:156 (find_package)
    /home/.../Programy/Qt/6.6.1/gcc_64/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake:40 (include)
    /home/.../Programy/Qt/6.6.1/gcc_64/lib/cmake/Qt6Quick/Qt6QuickDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
    /home/.../Programy/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
    /home/.../Programy/Qt/Tools/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
    
    mzimmersM 1 Reply Last reply
    0
    • R Rocky Plantchair

      Hi,
      it is a fresh QtCreator installation on Kubuntu 23.10. I guess that I need to set up some environment variables, but I am not sure what and where.

       /home/.../Qt/6.6.1/gcc_64/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake
      
      but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be
      NOT FOUND.  Reason given by package:
      
      Qt6Gui could not be found because dependency WrapOpenGL could not be found.
      
      Configuring with --debug-find-pkg=WrapOpenGL might reveal details why the
      package was not found.
      
      Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
      of the path variables that find_package uses to try and find the package.
      
      Stos wywołań:
      /home/.../test/CMakeLists.txt:9 (find_package)
      /home/.../Programy/Qt/6.6.1/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:156 (find_package)
      /home/.../Programy/Qt/6.6.1/gcc_64/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake:40 (include)
      /home/.../Programy/Qt/6.6.1/gcc_64/lib/cmake/Qt6Quick/Qt6QuickDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
      /home/.../Programy/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
      /home/.../Programy/Qt/Tools/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
      
      mzimmersM Offline
      mzimmersM Offline
      mzimmers
      wrote on last edited by
      #2

      @Rocky-Plantchair are you including OpenGL in your project?

      For that matter, do you have OpenGL installed?

      R 1 Reply Last reply
      0
      • mzimmersM mzimmers

        @Rocky-Plantchair are you including OpenGL in your project?

        For that matter, do you have OpenGL installed?

        R Offline
        R Offline
        Rocky Plantchair
        wrote on last edited by
        #3

        @mzimmers No, I don't and I have openGL installed.

        glxinfo | grep "OpenGL version"
        OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3
        
        mzimmersM 1 Reply Last reply
        0
        • R Rocky Plantchair

          @mzimmers No, I don't and I have openGL installed.

          glxinfo | grep "OpenGL version"
          OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3
          
          mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #4

          @Rocky-Plantchair I took a closer look at the documentation (should have done this before posting) -- evidently, Qt wants you to use the Qt GUI module instead.

          Does your CMakeLists.txt file have entries like these?

          find_package(Qt6 REQUIRED COMPONENTS Gui)
          target_link_libraries(mytarget PRIVATE Qt6::Gui)
          
          R 1 Reply Last reply
          0
          • mzimmersM mzimmers

            @Rocky-Plantchair I took a closer look at the documentation (should have done this before posting) -- evidently, Qt wants you to use the Qt GUI module instead.

            Does your CMakeLists.txt file have entries like these?

            find_package(Qt6 REQUIRED COMPONENTS Gui)
            target_link_libraries(mytarget PRIVATE Qt6::Gui)
            
            R Offline
            R Offline
            Rocky Plantchair
            wrote on last edited by
            #5

            @mzimmers yes, it has.
            Your previous answer led me to the solution. As I mentioned, it is a fresh installation and there was libgl1 library missing. Now, it works. Thank you. :-)

            mzimmersM 1 Reply Last reply
            0
            • R Rocky Plantchair

              @mzimmers yes, it has.
              Your previous answer led me to the solution. As I mentioned, it is a fresh installation and there was libgl1 library missing. Now, it works. Thank you. :-)

              mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by
              #6

              @Rocky-Plantchair glad to hear it. You might want to mark your topic as solved.

              1 Reply Last reply
              0
              • R Rocky Plantchair has marked this topic as solved on
              • I IdrisCodes referenced this topic on

              • Login

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