[webkit-qt] get page content
周鹏
zhoupeng19 at 126.com
Tue Mar 8 02:48:31 PST 2011
Hi,Kalle Vahlman!
I used the code in http://doc.qt.nokia.com/4.7-snapshot/qwebpage.html#using-qwebpage-in-a-widget-less-environment, but i get a Segmentation fault,this is my *.pro file:
QT += webkit svg network
SOURCES = Thumbnailer.cpp
HEADERS = Thumbnailer.hpp
CONFIG += qt console
and this is my main function:
int main(void)
{
QUrl url(http://www.sina.com.cn/);
Thumbnailer th(url);
return 0;
}
and i modified the render function:
void Thumbnailer::render()
{
qDebug << page.mainFrame()->toHtml();
emit finished();
}
Any one can tell me how to resolve this problem?
Zhou Peng
zhoupeng19 at 126.com
2011-03-08
======= 2011-03-08 17:26 11:26:09 Kalle Vahlman 您在来信中写到: Re: [webkit-qt] get page content=======
2011/3/8 周鹏 <zhoupeng19 at 126.com>:
> Hi,guys!
> ??? I want to get the page content after all external resource is loaded,but
> i don't want to call the QApplication::exec() function,is it
> possible(because this function open a window,but i don't need it,all i want
> is the content of the page)?
This might help:
http://doc.qt.nokia.com/4.7-snapshot/qwebpage.html#using-qwebpage-in-a-widget-less-environment
I think there was a blog post about this method in the qt labs blog too.
--
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.com
Interesting stuff at http://sandbox.movial.com
See also http://syslog.movial.fi
.
= = = = = = = = = = = = = = = = = = = =
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20110308/631610b5/attachment.html>
More information about the webkit-qt
mailing list