Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. CMake failed to load QWebWidgets module
Forum Updated to NodeBB v4.3 + New Features

CMake failed to load QWebWidgets module

Scheduled Pinned Locked Moved Unsolved QtWebEngine
17 Posts 5 Posters 4.5k 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.
  • SGaistS SGaist

    Excuse me to insist but: which compiler are you using ?

    K Offline
    K Offline
    KaiKai
    wrote on last edited by
    #8

    @SGaist said in CMake failed to load QWebWidgets module:

    Excuse me to insist but: which compiler are you using ?

    This?
    alt text

    jsulmJ 1 Reply Last reply
    0
    • K KaiKai

      @SGaist said in CMake failed to load QWebWidgets module:

      Excuse me to insist but: which compiler are you using ?

      This?
      alt text

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

      @KaiKai This is CMake, not compiler. Please show what compiler you're using.

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

      K 1 Reply Last reply
      0
      • jsulmJ jsulm

        @KaiKai This is CMake, not compiler. Please show what compiler you're using.

        K Offline
        K Offline
        KaiKai
        wrote on last edited by
        #10

        @jsulm Or this? (I'm sorry, I'm only a newbie)

        jsulmJ 1 Reply Last reply
        0
        • K KaiKai

          @jsulm Or this? (I'm sorry, I'm only a newbie)

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

          @KaiKai Ell, you could also simply show what compiler is set in the Kit, but from the last screen-shot it is at least visible that you're using MinGW. To use WebEngine you have to use Microsoft compiler (because the used Google Chromium engine only supports Microsoft compiler). So, you have to install Microsoft Visual Studio (or build tools) and Qt for Microsoft compiler.

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

          K 1 Reply Last reply
          1
          • jsulmJ jsulm

            @KaiKai Ell, you could also simply show what compiler is set in the Kit, but from the last screen-shot it is at least visible that you're using MinGW. To use WebEngine you have to use Microsoft compiler (because the used Google Chromium engine only supports Microsoft compiler). So, you have to install Microsoft Visual Studio (or build tools) and Qt for Microsoft compiler.

            K Offline
            K Offline
            KaiKai
            wrote on last edited by
            #12

            @jsulm I have changed the compiler to MSVC. Everything else has been successful, but CMake has not found this module so far.

            find_package(Qt6 REQUIRED COMPONENTS WebEngineWidgets)
            
            D:\Code\C++\project\dev-mini\dev-mini\ui\workspace.hpp:9: error: C1083: 无法打开包括文件: “QtWebView/QWebEngineView”: No such file or directory
            
            D:\Qt\Tools\CMake_64\share\cmake-3.23\Modules\CMakeFindDependencyMacro.cmake:47: warning: Found package configuration file: D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is considered to be NOT FOUND.  Reason given by package: Qt6WebEngineCore could not be found because dependency Qt6WebChannel could not be found. D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency) D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies) D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:40 (include) D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:209 (find_package) CMakeLists.txt:22 (find_package)
            
            jsulmJ 1 Reply Last reply
            0
            • K KaiKai

              @jsulm I have changed the compiler to MSVC. Everything else has been successful, but CMake has not found this module so far.

              find_package(Qt6 REQUIRED COMPONENTS WebEngineWidgets)
              
              D:\Code\C++\project\dev-mini\dev-mini\ui\workspace.hpp:9: error: C1083: 无法打开包括文件: “QtWebView/QWebEngineView”: No such file or directory
              
              D:\Qt\Tools\CMake_64\share\cmake-3.23\Modules\CMakeFindDependencyMacro.cmake:47: warning: Found package configuration file: D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is considered to be NOT FOUND.  Reason given by package: Qt6WebEngineCore could not be found because dependency Qt6WebChannel could not be found. D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency) D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies) D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:40 (include) D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:209 (find_package) CMakeLists.txt:22 (find_package)
              
              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #13

              @KaiKai Did you install QtWebView module for Qt/MSVC?

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

              K 1 Reply Last reply
              0
              • jsulmJ jsulm

                @KaiKai Did you install QtWebView module for Qt/MSVC?

                K Offline
                K Offline
                KaiKai
                wrote on last edited by
                #14

                @jsulm I've installed WebEngine and WebView module in Qt Maintenance Tool.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  KaiKai
                  wrote on last edited by
                  #15
                  D:\Qt\6.2.4\msvc2019_64\lib\cmake\Qt6\Qt6Config.cmake:209: warning: Found package configuration file: D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is considered to be NOT FOUND.  Reason given by package: Qt6WebEngineCore could not be found because dependency Qt6Positioning could not be found. CMakeLists.txt:22 (find_package)
                  D:\Code\C++\project\dev-mini\dev-mini\CMakeLists.txt:22: error: Found package configuration file: D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND.  Reason given by package: Failed to find Qt component "WebEngineCore". Expected Config file at "D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake" exists
                  :-1: error: CMake process exited with exit code 1.
                  :-1: error: CMake returned error code: 1
                  
                  1 Reply Last reply
                  0
                  • Haowei HsuH Offline
                    Haowei HsuH Offline
                    Haowei Hsu
                    wrote on last edited by
                    #16

                    I met the same error as you did. And it seems that the reason of my situation is because:

                    • WebEngineWidgets has a WebEngineCore dependency
                    • but WebEngineCore cannot find its Positioning dependency.

                    Therefore, after I install "Qt Positioning" module in Qt Maintainance Tools, the error disappeared.

                    ba687165-9e98-4977-8342-2768ad674e48-image.png

                    K 1 Reply Last reply
                    2
                    • Haowei HsuH Haowei Hsu

                      I met the same error as you did. And it seems that the reason of my situation is because:

                      • WebEngineWidgets has a WebEngineCore dependency
                      • but WebEngineCore cannot find its Positioning dependency.

                      Therefore, after I install "Qt Positioning" module in Qt Maintainance Tools, the error disappeared.

                      ba687165-9e98-4977-8342-2768ad674e48-image.png

                      K Offline
                      K Offline
                      Khang.DT
                      wrote on last edited by
                      #17

                      @Haowei-Hsu you saved my day ^^. Thank you. Qt Positioning really fix this issue on my Qt 6.8

                      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