Show animated progress inidicator while doing time consuming c++ stuff.
-
Hi,
i am trying to realize an animated progesss indicator.
The problem is that it should be displayed (and animated) while i call c++ stuff which takes some time.
I really do not want to start using threads for it.
Maybe there is an "easier" solution? Somethinh like overwrite cursor for desktop applications?How would you try to solve this?
Have a nice day,
Nando -
Hi
Try this..@
QMovie *movie = new QMovie(":Animations/icons/yourAnimatedIcon.gif");
QLabel *yourLabel = new QLabel(this);
yourLabel->setMovie(movie);
movie->start();
@hope it helps
-
I don't think so there's a direct way but you could emit a signal from QML, connect it to a C++ class and setCursor to Qt::BusyCursor or Qt::WaitCursor. QQuickItem also has setCursor();
-
I know you told about not starting the thread. But starting the thread is elegant way it avoids lot of stuff. I have tried earlier and move to thread finally.