LIbrary issue: How do I set up QtWebKit to parse HTML?
- by user560106
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;
}