Hi My fault. I did not mention the other function.
HB_FUNC( QT_CONNECT_EVENT ) { QObject * object = ( QObject * ) hb_parptr( 1 ); int type = hb_parni( 2 ); PHB_ITEM codeblock = hb_itemNew( hb_param( 3, HB_IT_BLOCK | HB_IT_BYREF ) ); Events * s_e = qt_getEventFilter(); char str[ 20 ]; hb_snprintf( str, sizeof( str ), "%s%i%s", "P", type, "P" ); /* Make it a unique identifier */ s_e->listBlock << codeblock; s_e->listActv << true; s_e->listObj << object; object->setProperty( str, ( int ) s_e->listBlock.size() ); hb_retl( true ); } => HB_FUNC( QT_CONNECT_EVENT ) { int type = hb_parni( 2 ); PHB_ITEM codeblock = hb_itemNew( hb_param( 3, HB_IT_BLOCK | HB_IT_BYREF ) ); Events * s_e = qt_getEventFilter(); QObject * object = ( QObject* ) hbqt_gcpointer( 1 ); if( !object ) { object = ( QObject* ) hb_parptr( 1 ); } char str[ 20 ]; hb_snprintf( str, sizeof( str ), "%s%i%s", "P", type, "P" ); /* Make it a unique identifier */ s_e->listBlock << codeblock; s_e->listActv << true; s_e->listObj << object; object->setProperty( str, ( int ) s_e->listBlock.size() ); hb_retl( true ); } Regards Pritpal Bedi -- View this message in context: http://www.nabble.com/HbQt-and-Connect-Events-tp25976580p25981393.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