PDA

View Full Version : QtVariantProperty and attributeValue(QLatin1String("decimals")



qt_developer
12th September 2013, 14:21
Hi,

I want to set 20 decimals in a QtVariantProperty. I use this code:



QtVariantProperty* variantProperty = m_pVariantManager->addProperty(QVariant::Double, "test");
variantProperty->setAttribute(QLatin1String("decimals"), 20);
qDebug() << "decimals" << variantProperty->attributeValue(QLatin1String("decimals"));


The generated output is 'decimals 13'. Is it a limitation of QtVariantProperty? How can I set more than 13 decimals?

Best regards.

qt_developer
17th September 2013, 15:19
Is it not possible?

wysota
18th September 2013, 18:06
More likely a limitation of the double type. Which of couse propagates to the attribute value.