Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, July 2007
QDialog, QPushButton and editable QCombobox


Message 1 in thread

I have a small nuisance with QDialog on Qt 4.3 OpenSource, mingw on WinXP.

If you add some QPushButtons to a QDialog, it seems to automatically 
choose one as the default button. This is fine.

However, my dialog also has a editable QComboBox. To update the entry, 
the user types in new text and presses enter. This causes activated() to 
be emitted, but the same enter press also causes the default button to 
be pressed. Is there a way to get qcombobox (or more likely the 
underlying qlineedit) to consume the enter press so the default button 
doesn't trigger?

--
 [ signature omitted ]