[Qt-interest] QTableWidget Update() problem

phil prentice philp.cheer at talktalk.net
Mon Nov 8 11:17:55 CET 2010


HI
  I am sure this is probably duf information, so you might want to ignore me.  
I just seem to remember a month or so ago I was trying to use update() to 
update a widget on the display..and it did'nt work for me either.  To fix 
this I called update like this:-
update(rect());
and for what ever reasons this fixed it???

I'm afraid I cant remember the details..all I do remember is that it fixed the 
problem for me....but maybe it was'nt working for me for a different reason.
Good Luck

Phil


On Monday 08 November 2010 06:40, prashant bhutani wrote:
> Hi Everyone,
>
> *I have asked this question before but didn't get any answer so posting it
> again.
> I hope someone might reply this time. Sorry to others for inconvenience.*
>
> I am building System Monitor in Qt.
> When I am calling my method for periodical update of processes
> via new/child thread, an internal QWidget::update() call is being
> generated, which according to documentation occurs and calls paintEvent()
> and erases previous widget's area.
> http://doc.qt.nokia.com/4.7/qwidget.html#update
>
> I am using QTabWidget to show processes, file_system and system information
> in different tabs. To show processes, I am using QTableWidget.
> Now, during periodical update, I am updating the QTableWidget due to which
> update() is called. This call is giving me a blank tab (which before thread
> working
> showing the process table). But as soon as I switch between tabs and come
> back
> to process tab again, the table(new one ;) is visible again.
>
> Now, how can I update the table without switching in between the tabs as it
> would
> not be user-friendly if user has to switch again and again between tabs to
> see the
> update.
>
> Thanks in advance.
>
> Regards,
> Prashant Bhutani



More information about the Qt-interest-old mailing list