Answer the question
In order to leave comments, you need to log in
What is the correct way to use QMovie when waiting for a long method to complete?
When connecting to the server, you need to display a widget with QMovie and some message, the connection has ended - close the panel. The problem is that while the QMovie connection itself is in progress, it is frozen, after which, when a warning appears, it starts to move. It is understandable - the connection works in a stream with graphics. What I have not tried, nothing works normally, how to do it right? Now I have reached QFutureWatcher. It turns out something like:
QFutureWatcher<bool> watcher;
....
LoadingSplashScreen screen("Подключение к серверу...", this);
screen.show();
connect(&watcher, SIGNAL(finished()), this, SLOT(handleFinished()));
future = QtConcurrent::run(this, &MainWindow::connectToServer, info.server);
watcher.setFuture(future);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question