On 27.07.08 09:23:48, lj wrote:
> And furthermore I read where string can be converted to just
> about everything... except Point, Rect and Size so to check 
> I ran the script below.
> 
> qv = QVariant(QString("255"))   # qv contains QString "255"
> print "\n Expect False"
> print qv.canConvert(QVariant.Point)
> print qv.canConvert(QVariant.Rect)
> print qv.canConvert(QVariant.Size)
> 
> print "\n Expect True"
> print qv.canConvert(QVariant.Bool)
> print qv.canConvert(QVariant.ByteArray)
> print qv.canConvert(QVariant.Char)      #!!! Prints False !!!

Well, the string has a length larger than 1 so its not possible to
convert it into a single character without loosing data.

Andreas

-- 
Look afar and see the end from the beginning.
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to