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 problems with Qt 5.0.2 win 64bits under windows 7 [SOLVED]
QtWS25 Last Chance

QWebView problems with Qt 5.0.2 win 64bits under windows 7 [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 5.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.
  • I Offline
    I Offline
    iqbal1980
    wrote on last edited by
    #1

    If I run without a QWebView it runs fine when I add a QWebView to the mainwindow.ui I get couple of errors. I did add QT += webkit
    as I encountered a similar problem with 4.8 but the problem still persist.

    mainwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QWebView::QWebView(class QWidget *)" (_imp??0QWebView@@QEAA@PEAVQWidget@@@Z) referenced in function "public: void __cdecl Ui_MainWindow::setupUi(class QMainWindow *)" (?setupUi@Ui_MainWindow@@QEAAXPEAVQMainWindow@@@Z)

    mainwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QWebView::~QWebView(void)" (_imp??1QWebView@@UEAA@XZ) referenced in function "public: virtual void * __cdecl QWebView::`scalar deleting destructor'(unsigned int)" (??_GQWebView@@UEAAPEAXI@Z)

    mainwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl QWebView::setUrl(class QUrl const &)" (_imp?setUrl@QWebView@@QEAAXAEBVQUrl@@@Z) referenced in function "public: void __cdecl Ui_MainWindow::setupUi(class QMainWindow *)" (?setupUi@Ui_MainWindow@@QEAAXPEAVQMainWindow@@@Z)

    mainwindow.obj:-1: error: LNK2001: unresolved external symbol "protected: virtual void __cdecl QWebView::changeEvent(class QEvent *)" (?changeEvent@QWebView@@MEAAXPEAVQEvent@@@Z)

    mainwindow.obj:-1: error: LNK2001: unresolved external symbol "protected: virtual void __cdecl QWebView::contextMenuEvent(class QContextMenuEvent *)" (?contextMenuEvent@QWebView@@MEAAXPEAVQContextMenuEvent@@@Z)

    mainwindow.obj:-1: error: LNK2001: unresolved external symbol "protected: virtual class QWebView * __cdecl QWebView::createWindow(enum QWebPage::WebWindowType)" (?createWindow@QWebView@@MEAAPEAV1@W4WebWindowType@QWebPage@@@Z)

    mainwindow.obj:-1: error: LNK2001: unresolved external symbol "protected: virtual void __cdecl QWebView::dragEnterEvent(class QDragEnterEvent *)" (?dragEnterEvent@QWebView@@MEAAXPEAVQDragEnterEvent@@@Z)

    And many other similar link errors

    ????

    Any help would be much apreciated.

    Thanks,

    1 Reply Last reply
    0
    • I Offline
      I Offline
      iqbal1980
      wrote on last edited by
      #2

      If removed the win 64 version and installed the mingw47 version instead same problem but different error message

      1 Reply Last reply
      0
      • raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        Do the following in your PRO file:
        QT += webkit webkitwidgets

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0
        • B Offline
          B Offline
          b1gsnak3
          wrote on last edited by
          #4

          Yes you need to add webkitwidgets module in your PRO file because from Qt 5.0 they reworked the modules so that QtWidgets and QtWebkitWidgets are separate modules from QtGui and QtWebkit

          1 Reply Last reply
          0
          • I Offline
            I Offline
            iqbal1980
            wrote on last edited by
            #5

            Thank you that works :)

            1 Reply Last reply
            0
            • B Offline
              B Offline
              b1gsnak3
              wrote on last edited by
              #6

              mark post as solved please :)

              1 Reply Last reply
              0
              • I Offline
                I Offline
                iqbal1980
                wrote on last edited by
                #7

                Ok! how do I do that I'm new here.

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  b1gsnak3
                  wrote on last edited by
                  #8

                  Just edit your first post, and in the title section add [SOLVED]

                  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