0

How to make a group of widgets change when user changes a combobox value in Qt

Hi, I am learning how to use Qt with Qt Creator and I want my program to have a combobox where the user selects an option. When they select the option, I want a group of widgets to change on the window to display options for whatever they selected. I kind of like the idea of having a GroupBox that will house these options widgets on the main widget, so is there some way I can just apply a widget with all the settings widgets on it to the GroupBox object when the combobox value changes? I don't need help with the event related part, only how to design the GroupBox / Settings widget relationship in the code.

27th Jun 2020, 8:16 PM
Nathan Stanley
Nathan Stanley - avatar
1 Odpowiedź
0
It is very easy. Create separate widgets. Store them in window class as list and add/remove from window rendering on changing combo!
28th Jun 2020, 10:16 AM
george
george - avatar