PDA

View Full Version : QVariant to QAxObject*



QDrow
7th August 2008, 09:50
I have QVariant value. It tapeName() == "QAxObject*".
How can I convert this QVariant value to QAxObject*?

This doesn't work:

QVariant v = ....; // Here I init my QVariant value
QAxObject* axObject = v.value<QAxObject*>();
It return a compiler error: 'qt_metatype_id' : is not a member of 'QMetaTypeId<T>'

spirit
7th August 2008, 10:35
read more about

int qRegisterMetaType ( const char * typeName )
http://doc.trolltech.com/4.4/qmetatype.html