Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. ‘QWebView’ does not name a type
QtWS25 Last Chance

‘QWebView’ does not name a type

Scheduled Pinned Locked Moved General and Desktop
qwebview
7 Posts 3 Posters 4.1k 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.
  • _ Offline
    _ Offline
    ___Jan___
    wrote on 10 Jun 2015, 17:17 last edited by
    #1

    Hello

    I get error

     error: ‘QWebView’ does not name a type
    

    although I have

    #include <QtWebView/QtWebView>
    

    what does not work:

    #include<QWebView>
    

    Ubuntu 14.04 OS

    I use QT5 with VTK 6 if this is needed.

    J 1 Reply Last reply 11 Jun 2015, 02:00
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Jun 2015, 19:01 last edited by
      #2

      Hi,

      If you are thinking about the QtWebView module, did you add:

      QT += webview

      to your pro file ?

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

      _ 1 Reply Last reply 10 Jun 2015, 19:08
      1
      • S SGaist
        10 Jun 2015, 19:01

        Hi,

        If you are thinking about the QtWebView module, did you add:

        QT += webview

        to your pro file ?

        _ Offline
        _ Offline
        ___Jan___
        wrote on 10 Jun 2015, 19:08 last edited by
        #3

        @SGaist

        Hello

        forgot to mention it is a CMakeProject.

        find_package (Qt5 REQUIRED COMPONENTS Widgets Core WebKit)
        

        is included. Not sure if WebKit is the right module name, tried to look this up.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 10 Jun 2015, 20:29 last edited by
          #4

          So your are using the QWebView from webkit, IIRC, you would also need the webkitwidgets module

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

          1 Reply Last reply
          0
          • _ ___Jan___
            10 Jun 2015, 17:17

            Hello

            I get error

             error: ‘QWebView’ does not name a type
            

            although I have

            #include <QtWebView/QtWebView>
            

            what does not work:

            #include<QWebView>
            

            Ubuntu 14.04 OS

            I use QT5 with VTK 6 if this is needed.

            J Offline
            J Offline
            JKSH
            Moderators
            wrote on 11 Jun 2015, 02:00 last edited by JKSH 6 Nov 2015, 02:02
            #5

            Hi @Jan,

            It is confusing, but "QWebView" does not come from "Qt WebView". Instead, it comes from "Qt WebKit Widgets", like @SGaist said.

            Qt WebView is mainly for mobile platforms to use the native web engine.

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

            1 Reply Last reply
            0
            • _ Offline
              _ Offline
              ___Jan___
              wrote on 11 Jun 2015, 06:28 last edited by
              #6

              Thanks for the help, I will test out (right now I do not have this setup anymore). Just one more quick question:
              the module name is WebKitWidgets? So

              find_package (Qt5 REQUIRED COMPONENTS Widgets Core WebKitWidgets)
              

              will work?
              and then in the include:

              #include <QtWebKitWidgets>
              

              Thanks alot

              J 1 Reply Last reply 11 Jun 2015, 13:36
              0
              • _ ___Jan___
                11 Jun 2015, 06:28

                Thanks for the help, I will test out (right now I do not have this setup anymore). Just one more quick question:
                the module name is WebKitWidgets? So

                find_package (Qt5 REQUIRED COMPONENTS Widgets Core WebKitWidgets)
                

                will work?
                and then in the include:

                #include <QtWebKitWidgets>
                

                Thanks alot

                J Offline
                J Offline
                JKSH
                Moderators
                wrote on 11 Jun 2015, 13:36 last edited by
                #7

                @Jan said:

                the module name is WebKitWidgets? So

                find_package (Qt5 REQUIRED COMPONENTS Widgets Core WebKitWidgets)
                

                will work?

                I'm not sure, sorry. I don't use CMake.

                and then in the include:

                #include <QtWebKitWidgets>
                

                No need to include the whole module. Just include the class you want: #include <QWebView>

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

                1 Reply Last reply
                0

                1/7

                10 Jun 2015, 17:17

                • Login

                • Login or register to search.
                1 out of 7
                • First post
                  1/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved