PDA

View Full Version : [QComboBox] avoid Enter keypress to select empty combo entry



lauranger
17th July 2006, 14:52
Hi
Following Wysota advice and my combo preselection problem,
I added an empty entry to my comboboxes.
I now have the side effect that typing enter (to trigger the dialog default button) selects the empty entry.
Should I filter the event or is there an easier way ?
Thnks in advance.

wysota
17th July 2006, 14:58
We'd have to see your dialog. It shouldn't work that way as you describe, can you explain exactly what happens? Especially, which widget has focus when you press enter?

lauranger
17th July 2006, 15:52
You are right : it does not behave the way I described.
It was a mistake of mine :o in handling the cancel button.