Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

QVariant to int

if myVariant.canConvert(QMetaType.Int):
    value = myVariant.toInt()
elif myVariant.canConvert(QMetaType.QString)
    value = myVariant.toString()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #QVariant #int
ADD COMMENT
Topic
Name
6+8 =