RE: Disabling the cancel button
"Russell Clarke" <[email protected]> Fri, 29 Nov 2002 12:27:08 -0000
| Newsgroups | gmane.comp.handhelds.zaurus.devel |
|---|---|
| Message-ID | <[email protected]> |
QPEApplication reimplements QApplication::qwsEventFilter() - this is where the key event for Qt::Key_Escape is trapped and hardwired to QWidget::close(). The key event will still be delivered, by a different route, but only after this has happened. you can get round this by reimplementing QApplication::notify() and filtering off the cancel key event there. -- Russell Clarke Picsel Technologies Ltd > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Konrad > Hinsen > Sent: 29 November 2002 10:20 > To: [email protected] > Cc: [email protected]; [email protected] > Subject: Re: [Zaurus-devel] Disabling the cancel button > > > > I have found that if you reimplement keypressevent slot(?) and in > > that you ev->ignore the events you are not interested in (eg cancel > > button), this will do what you want. Maybe it is not supposed to do > > that ? It does that for me anyway. > > That was my first idea, because a similar trick had worked well for > regaining control over the tab key. But none of my keypress event > handlers is even called when the cancel button is pressed. > > As for overwriting the close event, that is not what I really want. I > want the application terminated immediately when the user taps on the > close icon in the window title bar, for example. I just don't want the > cancel button to initiate the same procedure. Ideally, I would even > like to be able to use it for other purposes, but that is less > important. > > Konrad. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Get the new Palm Tungsten T > handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > _______________________________________________ > Zaurus-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/zaurus-devel ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en