dvmorris
11th March 2007, 03:38
I would like to have a QComboBox control the display of options based on what is currently selected in the ComboBox. I am fairly new to Qt and I haven't really figured the whole signals/slots thing out yet.
I have a ComboBox with "Mode 1", "Mode 2", "Mode 3", etc... and for "Mode 1" I want three checkboxes to be displayed, and "Mode 2", I want a SpinBox, and so on...
Is the best way to do this by using the currentIndexChanged signal, and sending it to a custom slot that hides and shows the options I want to display for each combobox choice? I'm not really sure the best way to structure this, because in the end I will have many different comboBoxes where each choice will need a page of options displayed below it.
Does anyone have an example of how I could accomplish this? Thanks for the help,
dave
I have a ComboBox with "Mode 1", "Mode 2", "Mode 3", etc... and for "Mode 1" I want three checkboxes to be displayed, and "Mode 2", I want a SpinBox, and so on...
Is the best way to do this by using the currentIndexChanged signal, and sending it to a custom slot that hides and shows the options I want to display for each combobox choice? I'm not really sure the best way to structure this, because in the end I will have many different comboBoxes where each choice will need a page of options displayed below it.
Does anyone have an example of how I could accomplish this? Thanks for the help,
dave