[SOLVED} Problems with QWebView
-
Hi All,
I have derived a class from QWidget. Named it WebBrowser.
I then included QWebView class in the WebBrowser class.
When I try to make a QWebView object I am getting all sorts of problems.
This is what I did like any other object:
In the WebBrowser header file:
QWebView * browser;
In the WebBrowser CPP file:
browser = new QWebView;
I am getting
webbrowser.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 WebBrowser::loadPage(void)" (?loadPage@WebBrowser@@QEAAXXZ)
webbrowser.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)
About 18 more errors like this.
Please help.
Thanks
-
-
Hi,
I now added. But still get give error messages. First one below:
webbrowser.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 WebBrowser::loadPage(void)" (?loadPage@WebBrowser@@QEAAXXZ)
second one:
webbrowser.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)
-
-
I did try. It did not work.
How do I check if I have the webkit libraries in my installation?
-
Then which version of Qt are you using on which OS and how did you install it ?
-
Hi,
The OS is Windows 8 Pro
Qt Creator 2.7.0
Qt 5.0.2 (32 bit)
-
Have you tried to compile/run the demos\browser example?
-
Hi,
When I try to compile the application without adding QT +=webkitwidgets, the applications does not compile.
When I later add QT +=webkitwidgets it still does not compile.
But when I make a new project and before compiling add QT +=webkitwidgets everything works fine.
Not sure why it does like that but I can make progress.
Thank you all for your time.
-