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. A problem that has been bothering me for 7 months
Forum Updated to NodeBB v4.3 + New Features

A problem that has been bothering me for 7 months

Scheduled Pinned Locked Moved Solved QtWebEngine
7 Posts 3 Posters 1.7k 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.
  • K Offline
    K Offline
    KaiKai
    wrote on last edited by
    #1

    I want to use the QWebEngine module.

    Following the document, I added in CMakeList.txt:

    find_package(Qt6 REQUIRED COMPONENTS WebEngineWidgets)
    target_link_libraries(target PRIVATE Qt::WebEngineWidgets)
    

    Press F7 to compile, I always get these:

    [cmake] Not searching for unused variables given on the command line.
    [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    [cmake] -- Could NOT find Qt6Positioning (missing: Qt6Positioning_DIR)
    [cmake] CMake Warning at C:/Program Files/CMake/share/cmake-3.25/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
    [cmake]   Found package configuration file:
    [cmake] 
    [cmake]     D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake
    [cmake] 
    [cmake]   but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is
    [cmake]   considered to be NOT FOUND.  Reason given by package:
    [cmake] 
    [cmake]   Qt6WebEngineCore could not be found because dependency Qt6Positioning could
    [cmake]   not be found.
    [cmake] 
    [cmake] Call Stack (most recent call first):
    [cmake]   D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
    [cmake]   D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)
    [cmake]   D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:40 (include)
    [cmake]   D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:209 (find_package)
    [cmake]   CMakeLists.txt:54 (find_package)
    [cmake] 
    [cmake] 
    [cmake] CMake Warning at D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:209 (find_package):
    [cmake]   Found package configuration file:
    [cmake] 
    [cmake]     D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake
    [cmake] 
    [cmake]   but it set Qt6WebEngineWidgets_FOUND to FALSE so package
    [cmake]   "Qt6WebEngineWidgets" is considered to be NOT FOUND.  Reason given by
    [cmake]   package:
    [cmake] 
    [cmake]   Qt6WebEngineWidgets could not be found because dependency Qt6WebEngineCore
    [cmake]   could not be found.
    [cmake] 
    [cmake] Call Stack (most recent call first):
    [cmake]   CMakeLists.txt:54 (find_package)
    [cmake] 
    [cmake] 
    [cmake] CMake Error at CMakeLists.txt:54 (find_package):
    [cmake]   Found package configuration file:
    [cmake] 
    [cmake]     D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake
    [cmake] 
    [cmake]   but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
    [cmake]   FOUND.  Reason given by package:
    [cmake] 
    [cmake]   Failed to find Qt component "WebEngineWidgets".
    [cmake] 
    [cmake]   Expected Config file at
    [cmake]   "D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake"
    [cmake]   exists
    [cmake] 
    [cmake]   
    [cmake] 
    [cmake] 
    [cmake] 
    [cmake] -- Configuring incomplete, errors occurred!
    [cmake] See also "D:/site/fanbook-bot-tools/build/CMakeFiles/CMakeOutput.log".
    [cmake] See also "D:/site/fanbook-bot-tools/build/CMakeFiles/CMakeError.log".
    [proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -SD:/site/fanbook-bot-tools -Bd:/site/fanbook-bot-tools/build -G "Visual Studio 17 2022" -T host=x64 -A x64 exited with code: 1
    [visual-studio] Patch Windows SDK path from C:\Program Files (x86)\Windows Kits\10\bin\x64 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64 for C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
    

    This time, I am sure that I'm using MSVC. And Qt 6.2.4, CMake 3.25.2.

    JKSHJ 1 Reply Last reply
    0
    • K Offline
      K Offline
      KaiKai
      wrote on last edited by
      #2

      Full CMake config:

      cmake_minimum_required(VERSION 3.25)
      
      project(fanbook_bot_tools VERSION 0.1.0 LANGUAGES CXX)
      set(CMAKE_BUILD_TYPE "Debug")
      
      set(CMAKE_AUTOUIC ON)
      set(CMAKE_AUTOMOC ON)
      set(CMAKE_AUTORCC ON)
      
      set(CMAKE_CXX_STANDARD 17)
      set(CMAKE_CXX_STANDARD_REQUIRED ON)
      
      find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
      find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
      find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
      
      set(PROJECT_SOURCES
              ./src/main.cpp
      )
      
      if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
          qt_add_executable(fanbook_bot_tools
              MANUAL_FINALIZATION
              ${PROJECT_SOURCES}
          )
      # Define target properties for Android with Qt 6 as:
      #    set_property(TARGET fanbook_bot_tools APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
      #                 ${CMAKE_CURRENT_SOURCE_DIR}/android)
      # For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
      else()
          if(ANDROID)
              add_library(fanbook_bot_tools SHARED
                  ${PROJECT_SOURCES}
              )
      # Define properties for Android with Qt 5 after find_package() calls as:
      #    set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
          else()
              add_executable(fanbook_bot_tools
                  ${PROJECT_SOURCES}
              )
          endif()
      endif()
      
      target_link_libraries(fanbook_bot_tools PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
      
      set_target_properties(fanbook_bot_tools PROPERTIES
          MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
          MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
          MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
          MACOSX_BUNDLE TRUE
          WIN32_EXECUTABLE TRUE
      )
      
      find_package(Qt6 REQUIRED COMPONENTS WebEngineWidgets)
      target_link_libraries(target PRIVATE Qt::WebEngineWidgets)
      
      install(TARGETS fanbook_bot_tools
          BUNDLE DESTINATION .
          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
      
      if(QT_VERSION_MAJOR EQUAL 6)
          qt_finalize_executable(fanbook_bot_tools)
      endif()
      
      1 Reply Last reply
      0
      • K KaiKai

        I want to use the QWebEngine module.

        Following the document, I added in CMakeList.txt:

        find_package(Qt6 REQUIRED COMPONENTS WebEngineWidgets)
        target_link_libraries(target PRIVATE Qt::WebEngineWidgets)
        

        Press F7 to compile, I always get these:

        [cmake] Not searching for unused variables given on the command line.
        [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
        [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
        [cmake] -- Could NOT find Qt6Positioning (missing: Qt6Positioning_DIR)
        [cmake] CMake Warning at C:/Program Files/CMake/share/cmake-3.25/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
        [cmake]   Found package configuration file:
        [cmake] 
        [cmake]     D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake
        [cmake] 
        [cmake]   but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is
        [cmake]   considered to be NOT FOUND.  Reason given by package:
        [cmake] 
        [cmake]   Qt6WebEngineCore could not be found because dependency Qt6Positioning could
        [cmake]   not be found.
        [cmake] 
        [cmake] Call Stack (most recent call first):
        [cmake]   D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
        [cmake]   D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)
        [cmake]   D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:40 (include)
        [cmake]   D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:209 (find_package)
        [cmake]   CMakeLists.txt:54 (find_package)
        [cmake] 
        [cmake] 
        [cmake] CMake Warning at D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:209 (find_package):
        [cmake]   Found package configuration file:
        [cmake] 
        [cmake]     D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake
        [cmake] 
        [cmake]   but it set Qt6WebEngineWidgets_FOUND to FALSE so package
        [cmake]   "Qt6WebEngineWidgets" is considered to be NOT FOUND.  Reason given by
        [cmake]   package:
        [cmake] 
        [cmake]   Qt6WebEngineWidgets could not be found because dependency Qt6WebEngineCore
        [cmake]   could not be found.
        [cmake] 
        [cmake] Call Stack (most recent call first):
        [cmake]   CMakeLists.txt:54 (find_package)
        [cmake] 
        [cmake] 
        [cmake] CMake Error at CMakeLists.txt:54 (find_package):
        [cmake]   Found package configuration file:
        [cmake] 
        [cmake]     D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake
        [cmake] 
        [cmake]   but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
        [cmake]   FOUND.  Reason given by package:
        [cmake] 
        [cmake]   Failed to find Qt component "WebEngineWidgets".
        [cmake] 
        [cmake]   Expected Config file at
        [cmake]   "D:/Qt/6.2.4/msvc2019_64/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake"
        [cmake]   exists
        [cmake] 
        [cmake]   
        [cmake] 
        [cmake] 
        [cmake] 
        [cmake] -- Configuring incomplete, errors occurred!
        [cmake] See also "D:/site/fanbook-bot-tools/build/CMakeFiles/CMakeOutput.log".
        [cmake] See also "D:/site/fanbook-bot-tools/build/CMakeFiles/CMakeError.log".
        [proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -SD:/site/fanbook-bot-tools -Bd:/site/fanbook-bot-tools/build -G "Visual Studio 17 2022" -T host=x64 -A x64 exited with code: 1
        [visual-studio] Patch Windows SDK path from C:\Program Files (x86)\Windows Kits\10\bin\x64 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64 for C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
        

        This time, I am sure that I'm using MSVC. And Qt 6.2.4, CMake 3.25.2.

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        @KaiKai said in A problem that has been bothering me for 7 months:

        [cmake] Qt6WebEngineCore could not be found because dependency Qt6Positioning could
        [cmake] not be found.

        This was in your error log.

        To fix it, install the Qt Positioning module.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        K 1 Reply Last reply
        1
        • JKSHJ JKSH

          @KaiKai said in A problem that has been bothering me for 7 months:

          [cmake] Qt6WebEngineCore could not be found because dependency Qt6Positioning could
          [cmake] not be found.

          This was in your error log.

          To fix it, install the Qt Positioning module.

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

          @JKSH
          I will not use the features about location. Could I not import this module?

          JKSHJ 1 Reply Last reply
          0
          • K KaiKai

            @JKSH
            I will not use the features about location. Could I not import this module?

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            @KaiKai said in A problem that has been bothering me for 7 months:

            Could I not import this module?

            Qt WebEngine uses that module behind-the-scenes, so you must install it.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            0
            • JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by JoeCFD
              #6

              @KaiKai said in A problem that has been bothering me for 7 months:

              WrapVulkanHeaders

              I would recommend you use higher Qt version for example 6.4. Have a look at the bug report about Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
              https://bugreports.qt.io/browse/QTBUG-95391

              1 Reply Last reply
              0
              • K Offline
                K Offline
                KaiKai
                wrote on last edited by
                #7

                @JKSH said in A problem that has been bothering me for 7 months:

                This was in your error log.

                To fix it, install the Qt Positioning module.

                Following this, I fix it! Thanks

                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