Thanks.
This is what i did and it works with qmake 4.3:
void Labirynt::oncemore()
{
loop++;
Generate();
update();
}
void Labirynt::Generate()
{
connect(timer, SIGNAL(timeout()), this, SLOT(oncemore()));
//mathematical calculations (these are changing variables which are used in
// Labirynt::paintEvent [this is why i use update();])
if(loop<120)
timer->singleShot(100, this, SLOT(oncemore()));
}
void Labirynt::oncemore()
{
loop++;
Generate();
update();
}
void Labirynt::Generate()
{
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(oncemore()));
//mathematical calculations (these are changing variables which are used in
// Labirynt::paintEvent [this is why i use update();])
if(loop<120)
timer->singleShot(100, this, SLOT(oncemore()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks