diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c632fcfbe1..0313d67e76 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/contrib/hbide/ideshortcuts.prg b/harbour/contrib/hbide/ideshortcuts.prg index 1a4cc38e9d..0a00e9927d 100644 --- a/harbour/contrib/hbide/ideshortcuts.prg +++ b/harbour/contrib/hbide/ideshortcuts.prg @@ -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 /*----------------------------------------------------------------------*/