Hi all I know this sounds weird, but is there anyway for the app to know the paint for a specific widget has completed and everything's displayed? Thanks.
Hi all I know this sounds weird, but is there anyway for the app to know the paint for a specific widget has completed and everything's displayed? Thanks.
Yes and no Directly no, indirectly yes. What do you need it for?
Got into this performance measurement thing on windows CE, we need to know how long did it take for paintEvent to complete painting. Indirect answer please.
In that case subclass the widget class you want to benchmark and reimplement its paintEvent. In the reimplementation write something like this:
Qt Code:
QTime t; BaseClass::paintEvent(e); qDebug() << t.elapsed(); }To copy to clipboard, switch view to plain text mode
An alternative is to reimplement event() or QApplication::notify() and do roughly the same there, but you'll get a bit different times.
Bookmarks