|
|
On Fri February 13 2009 10:27:09 Avishek_Sharma wrote:
> pic_dis::slideshow()
> {
> pic_dis::next_pic();
> QTimer *timer = new QTimer(this);
> connect( timer, SIGNAL(timeout()), SLOT(slideshow()) );
> timer->start( 950, TRUE );
> }
>
> **next_pic is a slot which is called when the 'Next Photo>>' button is
> clicked.I am calling that slot from the slideshow() slot.
Every time the slideshow() slot is called, a new QTimer instance will be
created. I guess what you really want is to create that QTimer once (within
the pic_dis class) and just call QTimer::start().
Or if you want to use a single-shot timer you can forget afterwards, use
QTimer::singleShot() instead!
Also, consider using Qt 4.4+!
HTH, René
--
René Reucher
rene.reucher@xxxxxxxxxxxxx
http://www.batcom-it.net/
The trouble with being punctual is that people think you have nothing
more important to do.
_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest
|
|