LIbrary issue: How do I set up QtWebKit to parse HTML?

Posted by user560106 on Stack Overflow See other posts from Stack Overflow or by user560106
Published on 2011-01-04T00:56:17Z Indexed on 2011/01/04 7:53 UTC
Read the original article Hit count: 509

Filed under:
|
|
|
|

Nick Presta showed that you can parse HTML with qt here: Library Recommendation: C++ HTML Parser

However, when I attempt to build this, I get an access violation on the "QWebFrame* frame = page.mainFrame();" line.

What am I doing wrong?

#include <QtWebKit\QWebElement>
#include <QtWebKit\QWebView>
#include <QtWebKit\QWebFrame>
#include <QtWebKit\QWebPage>
#include <iostream>

int main() {
 QWebPage page;
 QWebFrame* frame = page.mainFrame();

 frame->setHtml( "<html><head></head><body></body></html>" );
 QWebElement document = frame->documentElement();

 return 0;
}

© Stack Overflow or respective owner

Related posts about html

Related posts about qt