[Qt-interest] QWebPage in a thread

Jason H scorp1us at yahoo.com
Tue Jun 29 02:58:42 CEST 2010


I am not sure this is right. I believe I have used QPixmaps in non-main threads before. I think you just have to supply the device metrics (bpp, ARGB) rather than using the screen's metrics. QImage is device-independent. But if you choose your QPixmaps metrics to match you display, you should be optimized for drawing. 





________________________________
From: Tony Rietwyk <tony.rietwyk at rightsoft.com.au>
To: qt-interest at trolltech.com
Sent: Mon, June 28, 2010 8:25:06 PM
Subject: Re: [Qt-interest] QWebPage in a thread

Message 
Hi, 
 
Sorry 
for not responding earlier...
 
See 
the QWebPage doc for using it without widgets (and thus in other threads).  
 
You 
can only use QPixmaps in the main GUI thread.  Try rendering to 
a QImage instead, which should work in any thread.  
 
Tony.
 
 
-----Original Message-----
>From: >  qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] 
> On Behalf Of Juhana Jauhiainen
>Sent: Friday, 25 June 2010 
>  04:41
>To: Qt Interest
>Subject: [Qt-interest] QWebPage in a 
>  thread
>
>
>Hi, does anyone have experience using QWebPage in a threaded environment? 
> 
>
>Currently I'm loading HTML-content into a QWebPage and rendering parts 
>  of it to QPixmaps using QWebFrame's render-function. I would like to make this 
>  threaded since it takes some time especially with large HTML-pages. I'm 
>  wondering if this is possible or if anyone has a better way of doing this? 
> 
>
>Am I right assuming that a QWebPage can't be created outside the 
>  GUI-thread? 
>
>PS. What I'm essentially doing is pagination of 
>  html-content. 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100628/773a7aee/attachment.html 


More information about the Qt-interest-old mailing list