QScreen manual test: show names of enum values
It's more user-friendly to show primaryOrientation LandscapeOrientation instead of primaryOrientation 2 Change-Id: Ic1659b9253cd492bef347d6840cf3cf6e6d2c94f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
ca979a2f69
commit
3f64156e91
@ -44,6 +44,9 @@ PropertyField::PropertyField(QObject* subject, const QMetaProperty& prop, QWidge
|
||||
|
||||
QString PropertyField::valueToString(QVariant val)
|
||||
{
|
||||
if (m_prop.isEnumType())
|
||||
return QString::fromUtf8(m_prop.enumerator().key(val.toInt()));
|
||||
|
||||
QString text;
|
||||
switch (val.type()) {
|
||||
case QVariant::Double:
|
||||
|
Loading…
x
Reference in New Issue
Block a user