PDA

View Full Version : Howto benchmark QT correctly?



Linuxhippy
8th October 2008, 01:39
Hi,

I would like to write a benchmarking application similar to GtkPerf for QT4, however I am quite new to Qt, so it would be great if somebody could give me some advices:

1.) Whats the correct way of benchmarking QT?
2.) Do all api-calls paint changes immediatly (e.g. setSize), or do I have to force QT to do what I asked and let it finish explicitly?

Thank you in advace, Clemens

wysota
8th October 2008, 08:01
1.) Whats the correct way of benchmarking QT?
QTime is your friend here.


2.) Do all api-calls paint changes immediatly (e.g. setSize), or do I have to force QT to do what I asked and let it finish explicitly?

Each such operation schedules a paintEvent, so the actual drawing takes place a bit later.

Try searching the net for benchmarks using Qt. Search for Zack Rusin's benchmarks on graphics or Bradley Hughes' benchmark on strings.