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. How do I Install QT Web Engine for QT 6.3.1 ?
QtWS25 Last Chance

How do I Install QT Web Engine for QT 6.3.1 ?

Scheduled Pinned Locked Moved Solved QtWebEngine
8 Posts 2 Posters 4.2k Views
  • 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.
  • F Offline
    F Offline
    firstbloodcpp
    wrote on last edited by
    #1

    Hello, I am a beginner using QT Creator 6.3.1 with the MinGW 11.2 compiler trying to learn how to make my first GUI app in C++. I need QT Web engine for my project, and I'm having trouble getting set up.

    My goal is to just be able to drag and drop a web engine widget component into my window designer .UI file and go from there for a separate web window I'm building in my app. I want to use this instead of something like electron so I can get the barebones functionality and performance of C++ and not be restricted to JavaScript and HTML.

    Little intro aside, I've looked all over the QT's documentation trying to successfully install the QT Web Engine and its components but have had no luck. I thought it would be as simple as just checking the module on the installer, installing it, and including it in a header file but I was wrong.

    So far I have it installed as a module through the qt installer, and have added the required lines to my CMake file:
    find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Core WebEngineWidgets )
    target_link_libraries(ProjName PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt6::Core Qt::WebEngineWidgets)

    But when I build I get an error saying: Target "ProjName links to Qt::WebEngineWidgets but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing.

    I've read in some forms that I may need to build the module from source with another compiler, but don't know where to start with proper instructions. If this is true, why is it enlisted as an option in the installer if it doesn't work once installed? If anyone could help me with this, that would be great. I appreciate your time and patience.

    JKSHJ 1 Reply Last reply
    0
    • F Offline
      F Offline
      firstbloodcpp
      wrote on last edited by
      #3

      Is there any guide to getting MSVC and compiling it for QT? I've never done it before.

      JKSHJ 1 Reply Last reply
      0
      • F firstbloodcpp

        Hello, I am a beginner using QT Creator 6.3.1 with the MinGW 11.2 compiler trying to learn how to make my first GUI app in C++. I need QT Web engine for my project, and I'm having trouble getting set up.

        My goal is to just be able to drag and drop a web engine widget component into my window designer .UI file and go from there for a separate web window I'm building in my app. I want to use this instead of something like electron so I can get the barebones functionality and performance of C++ and not be restricted to JavaScript and HTML.

        Little intro aside, I've looked all over the QT's documentation trying to successfully install the QT Web Engine and its components but have had no luck. I thought it would be as simple as just checking the module on the installer, installing it, and including it in a header file but I was wrong.

        So far I have it installed as a module through the qt installer, and have added the required lines to my CMake file:
        find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Core WebEngineWidgets )
        target_link_libraries(ProjName PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt6::Core Qt::WebEngineWidgets)

        But when I build I get an error saying: Target "ProjName links to Qt::WebEngineWidgets but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing.

        I've read in some forms that I may need to build the module from source with another compiler, but don't know where to start with proper instructions. If this is true, why is it enlisted as an option in the installer if it doesn't work once installed? If anyone could help me with this, that would be great. I appreciate your time and patience.

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

        Hi, and welcome!

        @firstbloodcpp said in How do I Install QT Web Engine for QT 6.3.1 ?:

        MinGW 11.2 compiler

        Unfortunately, Chromium does not support MinGW -- it only supports MSVC.

        You'll need to change compilers (and download the MSVC kit) to use Qt WebEngine.

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

        1 Reply Last reply
        2
        • F Offline
          F Offline
          firstbloodcpp
          wrote on last edited by
          #3

          Is there any guide to getting MSVC and compiling it for QT? I've never done it before.

          JKSHJ 1 Reply Last reply
          0
          • F firstbloodcpp

            Is there any guide to getting MSVC and compiling it for QT? I've never done it before.

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

            @firstbloodcpp said in How do I Install QT Web Engine for QT 6.3.1 ?:

            getting MSVC

            https://visualstudio.microsoft.com/downloads/

            compiling it for QT

            After you install MSVC, run your Qt installer. Download a copy of Qt that is marked "MSVC" instead of "MinGW"

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

            1 Reply Last reply
            1
            • F Offline
              F Offline
              firstbloodcpp
              wrote on last edited by
              #5

              Ok thanks, so far I've got a new install of QT 6.3.1 running with MSVC on a fresh new project just for testing. I've been able to successfully build when I include the webenginewidgets module in my .pro file.

              b434d59a-4420-4d0c-ba39-4f636bc91851-image.png

              The problem now is I can't find the web engine view widget to drag and drop into my form. Do I have to install something else?

              2beb4165-44b4-4d6f-8158-83f3f4ea0dce-image.png

              JKSHJ 1 Reply Last reply
              0
              • F firstbloodcpp

                Ok thanks, so far I've got a new install of QT 6.3.1 running with MSVC on a fresh new project just for testing. I've been able to successfully build when I include the webenginewidgets module in my .pro file.

                b434d59a-4420-4d0c-ba39-4f636bc91851-image.png

                The problem now is I can't find the web engine view widget to drag and drop into my form. Do I have to install something else?

                2beb4165-44b4-4d6f-8158-83f3f4ea0dce-image.png

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

                @firstbloodcpp said in How do I Install QT Web Engine for QT 6.3.1 ?:

                The problem now is I can't find the web engine view widget to drag and drop into my form.

                It's a known problem with Qt Creator: https://bugreports.qt.io/browse/QTCREATORBUG-27807

                You can add QWebEngineView dynamically using C++ code.

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

                1 Reply Last reply
                1
                • F Offline
                  F Offline
                  firstbloodcpp
                  wrote on last edited by
                  #7

                  Alright, thanks for letting me know. I was actually able to copy and paste the widget in my project's designer from an example project. Sort of finessed it. Got everything to compile and run now. Do you know when that issue will be fixed?

                  JKSHJ 1 Reply Last reply
                  0
                  • F firstbloodcpp

                    Alright, thanks for letting me know. I was actually able to copy and paste the widget in my project's designer from an example project. Sort of finessed it. Got everything to compile and run now. Do you know when that issue will be fixed?

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

                    @firstbloodcpp said in How do I Install QT Web Engine for QT 6.3.1 ?:

                    Alright, thanks for letting me know. I was actually able to copy and paste the widget in my project's designer from an example project. Sort of finessed it. Got everything to compile and run now.

                    Great!

                    Do you know when that issue will be fixed?

                    Nope. Follow the bug report to get updates.

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

                    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