aboutsummaryrefslogtreecommitdiffstats
path: root/PageRunner.cpp
blob: 8839f1935c4302a6ac67982ce72180449c724ea8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "PageRunner.h"
#include <QApplication>
#include <QWebPage>
#include <QWebFrame>
#include <iostream>

PageRunner::PageRunner(const QUrl &webpage, QObject *parent) :
	QObject(parent)
{
	m_page = new QWebPage(this);
	connect(m_page, SIGNAL(loadFinished(bool)), this, SLOT(loaded()));
	m_page->mainFrame()->load(webpage);
}
void PageRunner::loaded()
{
	std::wcout << m_page->mainFrame()->toHtml().toStdWString();
	qApp->quit();
}