If you only need the timer to fire once, then use this in the constructor:
{
QTimer::singleShot( 30,
this,
SLOT( Update
() ) );
}
Stream::Stream(QWidget *parent) : QObject(parent)
{
QTimer::singleShot( 30, this, SLOT( Update() ) );
}
To copy to clipboard, switch view to plain text mode
No need to create a QTimer instance if you don't intend to reuse it. Your slot then becomes simply:
void Stream::Update()
{
ActualizarContadores();
if ( IsFinal( streamUltimo ) )
{
emit Finish();
}
}
void Stream::Update()
{
ActualizarContadores();
if ( IsFinal( streamUltimo ) )
{
emit Finish();
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks