[Qt-interest] How to wrap QObject with QVariant?

Bachrach, Robert L rob.bachrach at tycoelectronics.com
Wed Jan 28 13:24:08 CET 2009


Dmitry Teslenko wrote:
> Is there a way to return pointers to QObject through model's 
> data() function, i. e. wrap it with QVariant.

Take a look at QVariant::fromValue and qVariantFromValue.

This is actually first referenced in the documentation on:
QVariant::QVariant ( int typeOrUserType, const void * copy )



More information about the Qt-interest-old mailing list