Hello Thomas!
It could be related to system timer resolution, which is only set to a high setting, when you use intervals below 20ms. Try this:
YourClass::YourClass(..)
{
connect(timer,SIGNAL(timeout()),this,SLOT(doSomething());
timer->start(10);
}
void YourClass::doSomething()
{
static int counter = 1;
if (counter == 100)
{
// do your stuff here..
counter = 1;
} else {
++counter;
}
}
YourClass::YourClass(..)
{
QTimer* timer = new QTimer();
connect(timer,SIGNAL(timeout()),this,SLOT(doSomething());
timer->start(10);
}
void YourClass::doSomething()
{
static int counter = 1;
if (counter == 100)
{
// do your stuff here..
counter = 1;
} else {
++counter;
}
}
To copy to clipboard, switch view to plain text mode
HIH
Johannes
Bookmarks