Link error with static webkit 4.8.1
-
Hi all,
I'm stuck with a basic link error.
I'm using Visual 2008 and the Qt pluging on Windows 7 x64 and Qt 4.8.1
I have a small class who inherits from QWebPage and I cannot link it with QWebkit.
my class :
@
class MyQWebPage: public QWebPage {
Q_OBJECT ;
private:
ResourceObject & resource;
public:
MyQWebPage(ResourceObject & res);
virtual void javaScriptAlert(QWebFrame * frame, const QString & msg);
virtual bool javaScriptConfirm(QWebFrame * frame, const QString & msg);
virtual bool javaScriptPrompt(QWebFrame * frame, const QString & msg, const QString & defaultValue, QString * result);
virtual void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID);
public slots:
bool shouldInterruptJavaScript();
};@first error :
1>mywebclass.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWebPage::staticMetaObject" (?staticMetaObject@QWebPage@@2UQMetaObject@@B)And I have 8 of them like this one.
In the Qt project settings, QwebKit is included, on the project setting the lib file QtWebKitd4.lib is a dependencies.
In the file there are other class like
@
class MyNetworkAccessManager: public QNetworkAccessManager {
Q_OBJECT
private:
...
public:
...
signals:
...
};
@
but those one does not produce link error.Can someone help me ?
Thanks.
-
welcome to devnet
Did you create static Qt libs?
AFAIK that is not possible with webkit. -
thanks for your response.
Nope, I'm using the web kit as provided by qt, using the lib file and header files and at last the dlls.
-
did you create the .moc files with moc.exe?
-
It is not supported to use webkit in a static build of Qt. It was mentioned in some documentation, but I don't remember where exactly.
-
If so, how can we use web feature, i mean something like QWebPage or QWebView, in static build of Qt?
[quote author="Volker" date="1338133565"]It is not supported to use webkit in a static build of Qt. It was mentioned in some documentation, but I don't remember where exactly.[/quote] -
[quote author="Landy" date="1338428173"]If so, how can we use web feature, i mean something like QWebPage or QWebView, in static build of Qt?
[/quote]I have no idea, sorry.
-
Ohh, it's really a bad news to me.
I have to i have to use web feature in a static build of Qt.
I can't believe that there was no web control before webkit was intergrated into Qt.
Anyway, thanks for your reply, Volker.[quote author="Volker" date="1338500998"]
[quote author="Landy" date="1338428173"]If so, how can we use web feature, i mean something like QWebPage or QWebView, in static build of Qt?
[/quote]I have no idea, sorry.[/quote]
-
While not a full featured web browser, [[Doc:QTextBrowser]] might support a suitable subset of HTML for your use case.