View Full Version : Qtime compare
valgaba
6th September 2013, 15:56
As you can compare two QTime?
if(QTime::currentTime()== QTime(23,45,00)) //not working
thanks
nix
6th September 2013, 16:14
QTime has a milisec precision so the comparaison with between 23:45:00.000 and the current time should failled.
You can use secsTo() member of QTime, if the result is 0 then you got the same time.
valgaba
6th September 2013, 16:46
ok perfect
if(QTime::currentTime().secsTo(QTime(12,00,00))==0 )
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.