[maemo-developers] Strange problem with Maemo5ShowProgressIndicator

From: Robin Burchell viroteck at viroteck.net
Date: Tue Jun 8 15:26:04 EEST 2010
On Tue, Jun 8, 2010 at 1:18 PM, Felipe Crochik <felipe at crochik.com> wrote:
> Daniil: Thank you (again) for the clarification.
> Sascha Mäkelä: this is a simpler way than the QTimer::singleshot. :)

I should add that both sleeping and using a QTimer aren't really ideal
solutions, as the UI will be unresponsive while processing is going
on.

Generally speaking, you should *try* to not perform
blocking/synchronous operations unless you do them on a separate
thread (see QRunnable, QThread, QtConcurrent). The other alternative
is to use asynchronous equivilents to achieve what you're trying to
do, for example, using QNetworkAccessManager to download content is
asynchronous, and won't block the UI as a result. It's a little more
difficult to write, but the benefits are quite nice. :-)

> Felipe


Robin Burchell
mob: +447702671419
msn: msn at viroteck.net
irc: w00t @ irc.freenode.net
twr: http://twitter.com/w00teh
lac: http://identi.ca/w00t
More information about the maemo-developers mailing list