Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, June 2007
addWidget/removeWidget question


Message 1 in thread

I have several QToolButtons in a QGridLayout.  They are
numbered 1-5.  I am trying to make a forward/backward
mechanism to display 6-10, 11-15 etc.  My question is,
do I use removeWidget then addWidget (which appears to
not be working properly), or do I need to use
QStackedWidget because they are physically in the same
locations when I change them?

I have the forward/backward call working, but the display
comes up blank when I remove and then try to add the
new set of numbers.

Thanks for the help,
Jeff

--
 [ signature omitted ] 

Message 2 in thread

>I have several QToolButtons in a QGridLayout.  They are
>numbered 1-5.  I am trying to make a forward/backward
>mechanism to display 6-10, 11-15 etc.  My question is,
>do I use removeWidget then addWidget (which appears to
>not be working properly), or do I need to use
>QStackedWidget because they are physically in the same
>locations when I change them?
>
>I have the forward/backward call working, but the display
>comes up blank when I remove and then try to add the
>new set of numbers.

Hi,
sounds to me Stacked Widget (QStackedWidget) is what your looking for. Its 
available in the Designer (dont worry, the arrows for switching the widget 
wont be visible later in the application).

_________________________________________________________________
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit 
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu! 
http://desktop.msn.de/ Jetzt gratis downloaden!

--
 [ signature omitted ]