[Qt-interest] how to make QGraphicsView updated as soon as possible?

Zhao, Halley halley.zhao at intel.com
Sat Feb 12 09:10:39 CET 2011


Thanks.
After use QCoreApplication::processEvent (or use ::repaint() of QGraphicsView), there is still visible delay between QGraphicsItem::update and QGraphicsItem::paint.
I'm afraid QGraphicsView spend much time on paint preparation, draw the background for example.

I will try to build qt src to see more details.

-----Original Message-----
From: qt-interest-bounces+halley.zhao=intel.com at qt.nokia.com [mailto:qt-interest-bounces+halley.zhao=intel.com at qt.nokia.com] On Behalf Of Malyushytsky, Alex
Sent: Saturday, February 12, 2011 11:50 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] how to make QGraphicsView updated as soon as possible?

The only advertised way I know is to call QCoreApplication::processEvent.
Not sure QGraphicsView can do 30 updates per second though.

Alex



From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Zhao, Halley
Sent: Friday, February 11, 2011 6:27 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] how to make QGraphicsView updated as soon as possible?

After QGraphicsItem::update() is executed, there is some delay to QGraphicsItem::paint() is called.
This is not vital for common UI, but for a 30fps video frame update, this delay introduce many issue.

How could I make QGraphicsView updated as soon as possible?
Could I change the event loop to schedule the repaint as soon as possible?


There is also a similar issue for Qt::QueuedConnection, there is visible delay to invoke a method by QMetaObject::invokeMethod(this, method, Qt::QueuedConnection);
Could I reduce the delay?
(I can’t use Qt::DirectConnection because I need some code runs in Qt thread).

thanks
    ZHAO, Halley (Aihua)
    Email: halley.zhao at intel.com
    Tel: +86(21)61166476   iNet: 8821-6476
SSG/OTC/Moblin 3W038 Pole: F4


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”

“Please consider our environment before printing this email.”
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest


More information about the Qt-interest-old mailing list