[Interest] "Loading", recursion and GUI's

Bob Hood bhood2 at comcast.net
Mon Jan 7 16:44:31 CET 2013


On 1/7/2013 8:30 AM, William Hallatt wrote:
> Good day everyone,
>
> *What I'm trying to do:*
>
> Display some sort of "Loading" or "Busy" message while executing a recursive
> function of unknown depth (GUI app front end).
>
> *
> What I've tried:*
>
> Various attempts at using QMovie, QProgressBar, QDialog, QProgressDialog,
> etc.  No luck to date.


I'm only guessing, but it seems your main thread is probably being consumed by
the recursive calls, so the redraw of the widget cannot complete.  I'd suggest
running your recursive code in its own thread, leaving the main thread to be
responsive to GUI needs.  You then need to watch for the thread completion and
then dismiss the informative window.

If you arrange it like that, then your QProgressBar will probably function as
you expect.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130107/df52161e/attachment.html>


More information about the Interest mailing list