[Development] Why is QVariant::data() \internal?

Jędrzej Nowacki jedrzej.nowacki at qt.io
Mon Jul 18 07:59:21 CEST 2016


On Saturday 16 of July 2016 13:56:00 Konrad Rosenbaum wrote:
> Hi,
> 
> I am currently interfacing two libraries that only have QVariant in common,
> most of the (value) types getting exchanged are either Qt containers or
> Q_GADGETs.
> 
> I was relatively quick to realize that I needed the QMetaType and
> QMetaObject of these objects, but it took me pretty long to find out that I
> can use QVariant::data() to get at the void* that I need to access
> properties and Q_INVOKABLEs.
> 
> Is there a particular reason that QVariant::data() is classified as
> \internal or would a documentation patch be accepted?
> 
> 
> 
> 	Konrad

Mostly because it should not be needed.

Why can't you use https://doc.qt.io/qt-5/qvariant.html#value or 
https://doc.qt.io/qt-5/qvariant.html#qvariant_cast ?

Cheers,
 Jędrek?



More information about the Development mailing list