[Qt-interest] How to use QTime
Alexandre Beraud
aberaud at infflux.com
Thu Apr 16 16:20:57 CEST 2009
Hi,
You will never enter the loop because at the beginning time is 5 seconds
_less_ than time2. Even if you use a correct test, this will use all
your CPU. You should start thinking in terms of QTimer and signals/slots.
Regards,
Alex
Parameshwari a écrit :
> Hi All,
>
>
> I have tried this code to generate a delay before displaying
> the Frame which is :
>
>
> QTime time = QTime::currentTime(); // get the current time
> QTime time2= QTime::currentTime().addSecs(5);
> this->showMaximized();
> while(time >= time2 )
> {
> time = QTime::currentTime();
> }
> this->close();
>
> But it is not working well. I am not sure whether i have done any mistake in
> the above code.
> In the file , The Window is maximized only. It' not even entering to the
> "while" loop i believe.
> Some one correct me.
>
>
> Regards
> Param
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
--
BERAUD Alexandre
Ingénieur Développement
Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site : www.infflux.com
More information about the Qt-interest-old
mailing list