Hi Pritpal,
playing with QVariant() I found this/these missing options into QVariant.qth (see code below)
1) about QPersistentModelIndex is required to create QPersistentModelindex.qth before
so, here I have only reported as hint.
2) as you can see I have guarded version using
[*V= and I have replicated the test
as hard code, because I don't know if, within HB_FUNC, the
[*V= option is intercepted
by hbmk2_qt.hb
3) I haven't found hbqt_par_xxxx functions, so I think is an automated code.
Else (somewhere, but I don't know) we must create hbqt_par_QModelIndex( n )
4) in attachment I write
qvariant.ch and
qtmetatype.ch taken from current Qt 5.9
<CODE>
....
#include <QtCore/QModelIndex>
#include <QtCore/QPersistentModelIndex>
/*
QVariant ()
.....
QVariant ( const QModelIndex &val ) [*V=0x050000*]
QVariant ( const QPersistentModelIndex &val ) [*V=0x050500*]
~QVariant ()
*/
HB_FUNC( QT_QVARIANT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
if( hbqt_par_isDerivedFrom( 1, "QVARIANT" ) )
{
........
else if( hbqt_par_isDerivedFrom( 1, "QREGEXP" ) )
{
__HB_RETPTRGC__( new QVariant( *hbqt_par_QRegExp( 1 ) ) );
}
#if QT_VERSION >= 0x050000
else if( hbqt_par_isDerivedFrom( 1, "QMODELINDEX" ) )
{
__HB_RETPTRGC__( new QVariant( *hbqt_par_QModelIndex( 1 ) ) );
}
#endif
#if QT_VERSION >= 0x050500
else if( hbqt_par_isDerivedFrom( 1, "QPERSISTENTMODELINDEX" ) )
{
__HB_RETPTRGC__( new QVariant( *hbqt_par_QPersistentModelIndex( 1 ) ) );
}
#endif
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
..........Regards
Luigi Ferraris