QWebView problems with Qt 5.0.2 win 64bits under windows 7 [SOLVED]
-
wrote on 16 Apr 2013, 20:52 last edited by
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,
-
wrote on 16 Apr 2013, 20:57 last edited by
If removed the win 64 version and installed the mingw47 version instead same problem but different error message
-
Do the following in your PRO file:
QT += webkit webkitwidgets -
wrote on 17 Apr 2013, 07:33 last edited by
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
-
wrote on 17 Apr 2013, 12:49 last edited by
Thank you that works :)
-
wrote on 17 Apr 2013, 13:29 last edited by
mark post as solved please :)
-
wrote on 17 Apr 2013, 18:17 last edited by
Ok! how do I do that I'm new here.
-
wrote on 18 Apr 2013, 06:27 last edited by
Just edit your first post, and in the title section add [SOLVED]
6/8