PDA

View Full Version : use radio buttons instead of comboboxes for QtTreePropertyBrowser?



barrygp
6th August 2009, 15:51
Is there a way to add radio buttons instead of comboboxes to QtTreePropertyBrowser? I have a list of items that would be easier for radio button selection than to enumerate within a combobox.

thanks very much,

--Greg

wysota
9th August 2009, 19:48
I'd use subproperties with bool type that by default use checkboxes. Then you can implement your own delegate for the browser to substitute check boxes with radio buttons and implement the logic through QtProperty API (so that the subproperties are mutually exclusive).

barrygp
11th August 2009, 16:01
Thanks.. I think I know the concept you are saying.. can you give pseudo code or more specifics about the delagation and API calls. Can I still use the bool subproperties with a QVariant property editor?

Thanks again,
--Greg