Hi #include "common.ch"
STATIC qApp INIT PROCEDURE Qt_Start() qApp := QApplication():new() RETURN EXIT PROCEDURE Qt_End() qApp:quit() RETURN PROCEDURE Main() Local oWin // The following functions are to be called for each thread. // This change ensures more speed, initially every call to an event was checking for thread stack. // Qt_SetEventFilter() Qt_SetEventSlots() oWin := QMainWindow():new() oWin:ReSize( 640, 400 ) oWin:Move( 10 , 10 ) QT_CONNECT_EVENT( oWin:pPtr , 6 , {|o,e| My_Events( o , e ) } ) // *<-- Cancel here* oWin:Show() qApp:exec() RETURN .T. Function My_Events( o , e ) MsgInfo( "Key Pressed" ) Return .T. STATIC FUNCTION MsgInfo( cMsg ) LOCAL oMB oMB := QMessageBox():new() oMB:setInformativeText( cMsg ) oMB:setWindowTitle( "Harbour-QT" ) oMB:exec() RETURN nil #ifdef __PLATFORM__WINDOWS PROCEDURE hb_GtSys() HB_GT_GUI_DEFAULT() RETURN #endif Regards Pritpal Bedi -- View this message in context: http://www.nabble.com/HbQt-and-Connect-Events-tp25976580p25985786.html Sent from the Harbour - Dev mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour