PDA

View Full Version : Adding popup menu to QComboBox



squidge
9th November 2009, 20:59
I have a QComboBox that when drops down shows a large array of items. I want to make this list smaller by splitting some of the less used items into groups, and have the user open these groups by hovering over or clicking an arrow on the item.

Has someone already developed a widget like this? If not, and you think this is an appropriate way of handling this:

is it possible to draw such an arrow like icon on the right part of the combobox item without overwriting the paint event?
Would be correct in thinking I would have to override the MouseMove and MousePress events to show the popup menu?

aamer4yu
10th November 2009, 05:18
You can override the QComboBox::showPopup and provide your own widget which expands dynamically :)