2010-09-16 16:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbide/ideshortcuts.prg
    ! Demonstrated: how a QLabel can be intercepted for key events.
This commit is contained in:
Pritpal Bedi
2010-09-16 22:58:53 +00:00
parent 2d5d02b780
commit 3704351a28
2 changed files with 11 additions and 0 deletions

View File

@@ -16,6 +16,10 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-09-16 16:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/ideshortcuts.prg
! Demonstrated: how a QLabel can be intercepted for key events.
2010-09-16 13:32 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/ideactions.prg
* contrib/hbide/ideobject.prg

View File

@@ -308,6 +308,9 @@ METHOD IdeShortcuts:execEvent( nMode, p )
SWITCH nMode
CASE 21000
MsgBox( "KeyPress on LabelMacros" )
EXIT
CASE buttonDelete_clicked
nRow := ::oUI:q_tableMacros:currentRow()
IF nRow >= 0 .AND. nRow < len( ::aDftSCuts )
@@ -580,6 +583,10 @@ METHOD IdeShortcuts:buildUI()
::buildSignals()
/* Demonstration only */
::oUI:q_labelMacros:setFocusPolicy( Qt_StrongFocus )
::oUI:q_labelMacros:connect( QEvent_KeyPress, {|p| ::execEvent( 21000, p ) } )
RETURN Self
/*----------------------------------------------------------------------*/