[Qt-interest] update contents of QWidget

Dr. X xunlei at renci.org
Thu Jun 3 05:05:09 CEST 2010


Hi All,

I would like to dynamically add a set of QPushButton objects in a 
QWidget object after the program is in the main .exec() loop. The data 
hierarchy is like this:
QMainWindow -> QWidget -> QPushButton
                                               ...
                                              -> QPushButton
I know how to create and position QPushButton objects in a QWidget 
object before QMainWindow::show(). But after the program enter the main 
loop, any newly created objects under that QWidget are not shown. I 
checked out the painter example. But that is not what I want. Would you 
please help? Thanks a lot.

Best,
xunlei



More information about the Qt-interest-old mailing list