[Qt-interest] simple question about QComboBox

TP paratribulations at free.fr
Tue Mar 24 22:11:49 CET 2009


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



More information about the Qt-interest-old mailing list