On Wednesday 08 December 2010 01:42:20 José Arcángel Salazar Delgado wrote: > On Martes 07 Diciembre 2010 03:21:18 Zhongmiao Li escribió: > > Hi everyone, > > > > I can not figure how to use QVariant in QtJambi. > > So can you tell me how to write the following code in QtJambi? > > > > if (qVariantCanConvert<CanvasGradient>(style)) { > > CanvasGradient cg = qvariant_cast<CanvasGradient>(style); > > > > Thanks very much!! > > I'm not sure, but you can cast with java like this: > > if(style instanceof CanvasGradient) > CanvasGradient cg = (CanvasGradient) style; > > _______________________________________________ > Qt-jambi-interest mailing list > Qt-jambi-interest@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest >
I suppose (never used that function myself) that first checks if given variable is QVariant of that type and second one casts that QVariant to be that type. -- Terveisin, Samu Voutilainen http://smar.fi _______________________________________________ Qt-jambi-interest mailing list Qt-jambi-interest@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest