qt-interest@trolltech.com
[Top] [All Lists]

Re: [Qt-interest] QWebPage in a thread

Subject: Re: [Qt-interest] QWebPage in a thread
From: Jason H
Date: Mon, 28 Jun 2010 17:58:42 -0700 PDT
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@xxxxxxxxxxxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Mon, June 28, 2010 8:25:06 PM
Subject: Re: [Qt-interest] QWebPage in a thread

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@xxxxxxxxxxxxx [mailto:qt-interest-bounces@xxxxxxxxxxxxx] 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.


_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest
<Prev in Thread] Current Thread [Next in Thread>