Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. How do I use QWebView in a computer project and get the specification of attributes and methods for QWebView in the documentation?
QtWS25 Last Chance

How do I use QWebView in a computer project and get the specification of attributes and methods for QWebView in the documentation?

Scheduled Pinned Locked Moved Unsolved Qt WebKit
qt creator c++qtwebviewqt documentatio
18 Posts 4 Posters 2.7k 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.
  • G Offline
    G Offline
    gouneken
    wrote on last edited by
    #1

    Good evening to the whole community, I am working on a project for a web browser on a computer. I was told to use the "QWebView" class which will be my web engine for this project. But surprisingly when I include the header file for this class in my project, the IDE tells me that this file cannot be found. I don't know how to use it in my project, but I think I forgot to do some essential action before including this file. But I don't know which one. And also in the documentation for qt6, I get information about QWebView, they tell me it's a module and not a class. But, apart from a brief description on QWebView, I don't get any information about its classes or its attributes and methods yet the module is existing. I very much hope you can answer these questions.
    Thank you for your attention!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you add QT += webview to your .pro file ?

      It's shown here.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      G ? 3 Replies Last reply
      1
      • SGaistS SGaist

        Hi,

        Did you add QT += webview to your .pro file ?

        It's shown here.

        G Offline
        G Offline
        gouneken
        wrote on last edited by
        #3

        @SGaist I use Qt6 is it the same process

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Are you using qmake or cmake ?
          Both variants are shown in the module documentation.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          G 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Did you add QT += webview to your .pro file ?

            It's shown here.

            G Offline
            G Offline
            gouneken
            wrote on last edited by
            #5

            @SGaist This generates an error that says:
            Unknown module(s) in QT:webview

            1 Reply Last reply
            0
            • SGaistS SGaist

              Are you using qmake or cmake ?
              Both variants are shown in the module documentation.

              G Offline
              G Offline
              gouneken
              wrote on last edited by
              #6

              @SGaist And I use qmake

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Which release of Qt 6 are you using ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                G 1 Reply Last reply
                0
                • SGaistS SGaist

                  Which release of Qt 6 are you using ?

                  G Offline
                  G Offline
                  gouneken
                  wrote on last edited by
                  #8

                  @SGaist I use Qt6.2.1

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    I am unsure but isn't that module in the list of "extras" to install in the maintenance tool/online installer ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    G 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      I am unsure but isn't that module in the list of "extras" to install in the maintenance tool/online installer ?

                      G Offline
                      G Offline
                      gouneken
                      wrote on last edited by
                      #10

                      @SGaist Personally when I do a search for "qt6 installer maintenance tool", it does not give me very useful information in my opinion and then, I thought that when the library was installed, there were no more other modules to download. And if it is possible, please give me the procedure to install a module for qt or a link. Thank you!

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        If you installed Qt using the online installer, you can find the maintenance tool executable in the folder where the installation was done.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        G 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          If you installed Qt using the online installer, you can find the maintenance tool executable in the folder where the installation was done.

                          G Offline
                          G Offline
                          gouneken
                          wrote on last edited by
                          #12

                          @SGaist I did download the QtWebView module through the maintenance tool, but QtCreator still doesn't recognize it as a module. Maybe it was me who made a mistake, here is an image of my .pro file :
                          5793e076-7475-4814-a472-99fe156528d7-image.png

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            TheLumbee
                            wrote on last edited by TheLumbee
                            #13

                            On this link: https://doc.qt.io/qt-6/qwebengineview.html

                            You'll notice at the top in a box that says
                            qmake
                            with a module dependency QT += webenginewidgets.

                            With every class, make sure that the module is added in the .pro file, and after run qmake.

                            In QtCreator that would be at the top under the Build option.

                            G 1 Reply Last reply
                            0
                            • T TheLumbee

                              On this link: https://doc.qt.io/qt-6/qwebengineview.html

                              You'll notice at the top in a box that says
                              qmake
                              with a module dependency QT += webenginewidgets.

                              With every class, make sure that the module is added in the .pro file, and after run qmake.

                              In QtCreator that would be at the top under the Build option.

                              G Offline
                              G Offline
                              gouneken
                              wrote on last edited by gouneken
                              #14

                              @TheLumbee When I add "QT += webenginewidgets" in
                              the .pro file and I include in the file of one of my projects "#include <QWebEngineView>" , I am told that the file does not exist. Is there an order to follow for this?
                              I use windows 10 and here is the result of my compiler output:
                              5c58f384-750e-4d52-82e3-ff83830d95b5-image.png ![0_1645480356339_da0dfd40-7b43-4cb1-9d04-29227cd3468a-image.png](Uploading 100%)

                              T 1 Reply Last reply
                              0
                              • G gouneken

                                @TheLumbee When I add "QT += webenginewidgets" in
                                the .pro file and I include in the file of one of my projects "#include <QWebEngineView>" , I am told that the file does not exist. Is there an order to follow for this?
                                I use windows 10 and here is the result of my compiler output:
                                5c58f384-750e-4d52-82e3-ff83830d95b5-image.png ![0_1645480356339_da0dfd40-7b43-4cb1-9d04-29227cd3468a-image.png](Uploading 100%)

                                T Offline
                                T Offline
                                TheLumbee
                                wrote on last edited by TheLumbee
                                #15

                                @gouneken Please explain "add in the .pro file and do an include." I'm unsure what that means.

                                What is telling you which file doesn't exist? Be more specific than you think is necessary. Your question can be interpreted many ways.

                                Also, what operating system are you using? And post a snippet of your code along with compiler output errors. That would also be helpful in resolving your issue.

                                G 1 Reply Last reply
                                0
                                • T TheLumbee

                                  @gouneken Please explain "add in the .pro file and do an include." I'm unsure what that means.

                                  What is telling you which file doesn't exist? Be more specific than you think is necessary. Your question can be interpreted many ways.

                                  Also, what operating system are you using? And post a snippet of your code along with compiler output errors. That would also be helpful in resolving your issue.

                                  G Offline
                                  G Offline
                                  gouneken
                                  wrote on last edited by
                                  #16

                                  @TheLumbee I edited my question

                                  1 Reply Last reply
                                  0
                                  • G Offline
                                    G Offline
                                    gouneken
                                    wrote on last edited by
                                    #17

                                    One question, I thought qtwebenginewidgets was an optional module and I recently downloaded the module, so I already downloaded two modules that my qt framework didn't have. Namely, qwebview and qwebengine modules. They are indeed present in my library folder, but my project sees them as non-existent. Since I uploaded them after my project was created and my project contains technical files that were created with it, I was wondering if that could be the reason my project isn't considering them and if that's the case how to update my project to take into account the changes of the library?

                                    1 Reply Last reply
                                    0
                                    • SGaistS SGaist

                                      Hi,

                                      Did you add QT += webview to your .pro file ?

                                      It's shown here.

                                      ? Offline
                                      ? Offline
                                      A Former User
                                      wrote on last edited by
                                      #18

                                      @SGaist This error occurs when I add this:Project ERROR: Unknown module(s) in QT: webkit

                                      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