[Qt-interest] QLabel is invisible after setText()

Bruno Colombet Bruno.Colombet at univmed.fr
Fri Jan 28 13:02:07 CET 2011


Le 28/01/2011 12:56, Sean Harmer a écrit :
> On Friday 28 January 2011 11:41:18 Bruno Colombet wrote:
>> Le 28/01/2011 12:39, Sean Harmer a écrit :
>>> On Friday 28 January 2011 11:37:43 Bruno Colombet wrote:
>>>> the show() in constructor is supposed to repaint the widget, isn't it?
>>> It *schedules* a repaint which requires the event loop to be running to
>>> actually get processed.
>>>
>>> Sean
>>> _______________________________________________
>>> Qt-interest mailing list
>>> Qt-interest at qt.nokia.com
>>> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>> OK, thanks.
>> so the solution is :
>>
>> PleaseWaitWidget wait(QString("Wait for me"));
>> wait.repaint();
> No, that will only paint your GUI once. T keep your GUI alive during your long
> calculation you need to make sure the event loop is allowed to run
> periodically.
>
> Please have a read of this article:
>
> http://doc.qt.nokia.com/qq/qq27-responsive-guis.html
>
> Sean
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
Ok thank you for the link.
I'm already using threads in my application. That Widget was just to 
warn users for some unresponsive UI during relatively short time.
-- 
Bruno Colombet
*INSERM UMR 751* - Epilepsie et Cognition
Faculté de Médecine
27 Bd Jean Moulin
13385 Marseille cedex 05
+33 4 91 38 55 40
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110128/a318408b/attachment.html 


More information about the Qt-interest-old mailing list