Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. "QtWebEngine is not installed" warning even though it is - urgent

"QtWebEngine is not installed" warning even though it is - urgent

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 609 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.
  • franco.amatoF Offline
    franco.amatoF Offline
    franco.amato
    wrote on last edited by
    #1

    I am developing an application using QML and I need to use WebEngineView to render some webpages.
    I need to build it in both Windows and Linux (Ubuntu)

    In my top-level cmake I fing the package in this way:

    set(QT_COMPONENTS Widgets
        WebEngineQuick
        Qml
        Quick
        Svg
        Gui
        Network
        NetworkAuth
        LinguistTools
        PrintSupport
        Core5Compat
    )
    
    find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS ${QT_COMPONENTS})
    find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${QT_COMPONENTS})
    ....
    target_link_libraries(${PROJECT_NAME} PRIVATE
         ....
        Qt6::Qml
        Qt6::Quick
        Qt6::WebEngineQuick
       ...
    )
    

    Then in the Main.qml I import and use it

    import QtWebEngine
    .... more code ....
        WebEngineView {
            id: webView
    
            anchors {
                top: topContainer.bottom
                left: leftToolbar.right
                bottom: bottomBorder.top
                right: rightBorder.left
            }
            settings.localContentCanAccessRemoteUrls: true
    
            Component.onCompleted: {
                console.log("URL:", url)
            }
    
            onCertificateError: function(error) {
                error.defer()
    
                // Display information about the error
                console.log("Certificate error: " + error.description)
                console.log("Error type: " + error.type)
                console.log("URL: " + error.url)
    
                if (error.overridable) {
                    error.acceptCertificate()
                }
            }
        }
    
    

    I have no problems in building it for Windows and in Linux (Debug mode) but I get this warning

    [warning] qrc:/Qml/Main.qml:5:1: module "QtWebEngine" is not installed (qrc:/Qml/Main.qml:5)
    

    when trying to build under Linux in Release mode. I installed the QtWebEngine module using the Maintenance tool. I am using Qt 6.8.1. I can also see the lib in the Qt installation lib folder

    So I don't understand why in debug mode it detects it and in release mode it's not.
    Any help please

    1 Reply Last reply
    0
    • franco.amatoF Offline
      franco.amatoF Offline
      franco.amato
      wrote on last edited by franco.amato
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • franco.amatoF franco.amato 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