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
[email protected]
2011-03-08
======= 2011-03-08 17:26 11:26:09 Kalle Vahlman 您在来信中写到: Re: [webkit-qt] get
page content=======
2011/3/8 周鹏 <[email protected]>:
> 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, [email protected]
Powered by http://movial.com
Interesting stuff at http://sandbox.movial.com
See also http://syslog.movial.fi
.
= = = = = = = = = = = = = = = = = = = = _______________________________________________
webkit-qt mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt