PDA

View Full Version : QCombobox showPopup



SailinShoes
8th August 2008, 09:33
I develop for an embedded application. This embedded device does not have a mouse or pc keyboard.

The set of buttons is up, down, right, left, ok, softLeft & softRight. I read the button input device and map the key ids for the buttonpresses to Qt keys.

I have a tablewidget with spinbox delegates. The spinbox delegates works fine. I am able to open (ok button), set value (up/down) and save/close (ok button).

I would like to add a combobox delegate. It'll only include ON and OFF. I want to open it as a popup and I would like to catch the keypress to choose between ON/OFF.

I have subclassed a combobox and installed and eventfilter. So I can open the delegate (ok button) and save/close (ok button) but I cant use the up/down buttons (I use setCurrentIndex(int)) even if I catch the keypress events.

What am I missing here?

SailinShoes
8th August 2008, 12:21
SOLVED...I can use the combobox model and view to do what I want.