Creating a QComboBox with checkboxes within it
-
Hi,
Before diving further in the implementation details, can you explain the design decision for having checkboxes in a combo box ? That's pretty counterintuitive from a user perspective to have that kind of information hidden in such a control.
-
@SGaist
Hi! Thanks for your quick reply!Here's an illustration:
Explanation:
You press on the menu, it shows you a few options to select from. But also, you can un/check the options.This could be used for:
I have a team of players, and I want to check the ones who will be assigned into the game, but then I want to select one of them to display his data on the screen. -
In the context of a menu, having checkboxes is fine as you also have the complete view of the possibilities.
In the context of a team of players, I would rather expect to have a list view that I can go up and down at will where I can see what I have selected rather than having to use a combo box that I would need to open and re-open.
-
@SGaist said in Creating a QComboBox with checkboxes within it:
In the context of a menu, having checkboxes is fine as you also have the complete view of the possibilities.
In the context of a team of players, I would rather expect to have a list view that I can go up and down at will where I can see what I have selected rather than having to use a combo box that I would need to open and re-open.
@JonB said in Creating a QComboBox with checkboxes within it:
@rssweiss
As @SGaist says use aQListView
here. A combobox is intended to pick a single item, not put checks against multiple items.Alright, thank you guys!