
Originally Posted by
ChrisW67
You want a web browser component... I'm sure you can find that in Qt Assistant.
Hello, Chris!
Thanks again for the reply.
Well, I'm gonna give a look than in the Qt Assistant ( you mean this one, yes? [http://doc.qt.nokia.com/4.6/assistant-manual.html]).
The problem, though, is that if this means to use the QWebView class, than I imagine I'm gonna find problems to use it in my software. For another reason I want to use the QWebView in my software - to display Wikipedia's articles when the user clicks in the "Wikipedia" tab in a given place - and despite the "fancy browser" exemple runs OK when I compile and execute it in the Qt, I simply am unable to include it in my software. If I simply include it by the Ui interface, the compiler shows:
:-1: error: collect2: ld returned 1 exit status
and it doesn't run. I added no code till then, but that is what it shows. But if I try to include it from the h/cpp files:
//HEADER
#include <QtWebKit/QWebView>
private:
QWebView view;
//HEADER
#include <QtWebKit/QWebView>
private:
QWebView view;
To copy to clipboard, switch view to plain text mode
than the compiler shows:
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:6: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:21: error: undefined reference to `_imp___ZN8QWebViewD1Ev'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:6: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:21: error: undefined reference to `_imp___ZN8QWebViewD1Ev'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:26: error: undefined reference to `_imp___ZN8QWebViewD1Ev'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:26: error: undefined reference to `_imp___ZN8QWebViewD1Ev'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:26: error: undefined reference to `_imp___ZN8QWebViewD1Ev'
:-1: error: collect2: ld returned 1 exit status
And if I include it as a pointer, everything runs ok, but when I point the pointer to a QWebView, new problems arise:
///CPP
view = new QWebView;
///ERRORS:
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:11: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:11: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
:-1: error: collect2: ld returned 1 exit status
///CPP
view = new QWebView;
///ERRORS:
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:11: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:11: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
:-1: error: collect2: ld returned 1 exit status
To copy to clipboard, switch view to plain text mode
///CPP
view = new QWebView(this);
/* or
view = new QWebView(ui->Tab);
or
view = new QWebView(ui->Tab->widget(1)); //To indicate that I want to create the QWebView in the second tab of the QTabWidget
*/
//ERRORS:
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:11: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:11: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
:-1: error: collect2: ld returned 1 exit status
///CPP
view = new QWebView(this);
/* or
view = new QWebView(ui->Tab);
or
view = new QWebView(ui->Tab->widget(1)); //To indicate that I want to create the QWebView in the second tab of the QTabWidget
*/
//ERRORS:
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:11: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
D:\- Meus Documentos\Minhas obras\Softwares\mAcy\mAcy 0.03\body.cpp:11: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget'
:-1: error: collect2: ld returned 1 exit status
To copy to clipboard, switch view to plain text mode
So I imagine that I'm gonna have problems if I add a web browser component!!
Thanks,
Momergil.
Bookmarks