Hello Przemek, All
HB_GARBAGE_FUNC( release_QMainWindow )
{
void ** ph = ( void ** ) Cargo;
if( ph && * ph )
{
delete ( ( QMainWindow * ) * ph );
* ph = NULL;
}
}
HB_FUNC( QT_QMAINWINDOW )
{
void ** ph = ( void ** ) hb_gcAlloc( sizeof( void * ),
release_QMainWindow );
QPointer< QMainWindow > pObj = NULL;
pObj = new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags )
hb_parni( 2 ) ) ;
* ph = pObj;
hb_retptrGC( ph );
}
The access function:
#define hbqt_par_QMainWindow( n ) ( ( QMainWindow * ) hbqt_gcpointer( n,
relese_QMainWindow ) )
void * hbqt_gcpointer( int iParam, HB_GARBAGE_FUNC_PTR pFunc )
{
void ** ph = ( void ** ) hb_parptrGC( pFunc, iParam );
/////////////////////////
//
// At this point <pFunc> is not NULL but <ph> is NULL
//
/////////////////////////
return ( ph && * ph ? * ph : hb_parptr( iParam ) );
}
PRG Call:
oWnd := QMainWindow():new()
oWnd:anyAction() => GPFs
What I am doing wrong ?
Regards
Pritpal Bedi
--
View this message in context:
http://www.nabble.com/HBQT---A-Clarification-tp25951642p25951642.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour