[Qt-interest] simple question about QComboBox

Felipe Romero Gonzalez fjromerog at gmail.com
Wed Mar 25 01:21:17 CET 2009


You can try with the signal and try to catch it on a slot. Check this signal
 void QComboBox::currentIndexChanged ( const
QString<http://doc.trolltech.com/4.4/qstring.html>&
*text* )

2009/3/24 TP <paratribulations at free.fr>

> Hi everybody,
>
> I want to specialize a QComboBox. I take a dummy example: if there are the
> following choices in the popup list provided by the QComboBox:
>
> "toto"
> "titi"
> "tutu"
>
> I want that if the user chooses "toto", to display "toto has been chosen"
> in
> the QComboBox.
> If the user chooses "titi", then I want to display "titi has been chosen".
>
> How to do that?
> I have not found the method that allows to modify the current text
> displayed
> in the QComboBox (once the popup has disappeared. Is it a QLabel?)
> I have tried to play with a lot of methods provided by QComboBox, without
> success (for example, "currentText", "setItemText", etc.).
>
> Thanks in advance
>
> Julien
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090324/b949a67d/attachment.html 


More information about the Qt-interest-old mailing list