QTime::currentTime can be a very costly call.
But maybe you can explain what you are actually trying to do?
That doesn't look like anything that would appear in a real program.
Cheers,
_
QTime::currentTime can be a very costly call.
But maybe you can explain what you are actually trying to do?
That doesn't look like anything that would appear in a real program.
Cheers,
_
Hello anda_skoa,
Thanks for your reply.
I'm doing nothing more than moving a QLabel around a form, with the delay between moves.
Regards
Hmm.
Wouldn't that be easier with a QPropertyAnimation?
Cheers,
_
jimbo (2nd June 2016)
If You really need this method do it like this :Qt Code:
void myProg:tDelay(int milliSecs) { QElapsedTimer timer; timer.restart(); qint64 nanoSec; timer.start(); QEventLoop loop; loop.exec(); nanoSec = timer.nsecsElapsed(); qDebug() << nanoSec; }To copy to clipboard, switch view to plain text mode
jimbo (2nd June 2016)
Helo,
Thanks to anda_skoa and Lesiok.
Yes, some nice effects.Wouldn't that be easier with a QPropertyAnimation?
Gives a simiar result between the two systems.If You really need this method do it like this :
Regards
Bookmarks