On Wed, 5 Nov 2003 17:58:36 +0530 (IST), Himanshu Arora wrote: > On Wed, 5 Nov 2003, Michael Schwendt wrote: > > > On Wed, 5 Nov 2003 10:42:34 +0530 (IST), Himanshu Arora wrote: > > > > > Hi All, > > > I am new to Qt. I developed a sample widget with some pushbuttons. I > > > defined some signals with some buttons like clicked(), pressed() etc. But > > > when i'm setting focus to that button, using tab, and then i'm > > > pressing "Enter" ,desired action is not being taken by the Qt as Expected. > > > What is the problem? Even in the sample examples provided along with qtdoc > > > this action is not working(see addressbook example). What shall i do? > > > > Hit "Space" or the short-cut key (if one is defined) instead of > > "Enter". > > Do you mean that there is no solution for this problem ? Read up on how to make your button the "default" button, or several buttons "autodefault" buttons. That would be the only way to receive a signal when the user presses Enter, regardless of where focus is. Else you need to press Space instead of Enter. > What about KDE dialog boxes ? We can push the button as well as click it. This is implementation dependent. Normal behaviour is to press "Space" and not "Enter". Only default buttons (usually OK/Cancel) accept the Enter key. --
Attachment:
pgp00744.pgp
Description: PGP signature