If you have a list of int enum (which you should, manipulate the interger
value and convert to string only to save/restore value and display to user
options):
objectOfMyClass.availaleValuesOfMyEnum.indexOf(parseIInt(objectOfMyClass.myEnumProperty));
// This should work
If you want to have a strin
Thank you for replies,
Seems like there is no easy way of doing that.
Andre still on Qt Quick side list.indexOf(MyEnum.MyEnumValue1) won't work
for list being string list.
Cheers,
Tomasz
2016-07-22 22:13 GMT+01:00 André Somers :
>
>
> Op 21/07/2016 om 17:17 schreef Tomasz Olszak:
>
> Hi,
>
> I
Op 21/07/2016 om 17:17 schreef Tomasz Olszak:
Hi,
I encountered something that bothers me for a few days. I would be
thankful if someone can point nice workaround for such case:
class MyClass {
Q_OBJECT
Q_PROPERTY(MyEnum myEnumProperty ...)
Q_PROPERTY(QVariantList availableVa
ash::Sha3_224,
Sha3_256 = QCryptographicHash::Sha3_256,
Sha3_384 = QCryptographicHash::Sha3_384,
Sha3_512 = QCryptographicHash::Sha3_512,
};
};
Sent: Thursday, July 21, 2016 at 11:17 AM
From: "Tomasz Olszak"
To: "Qt Interest"
Subject: [Interest] Correct wa
Hi,
I encountered something that bothers me for a few days. I would be thankful
if someone can point nice workaround for such case:
class MyClass {
Q_OBJECT
Q_PROPERTY(MyEnum myEnumProperty ...)
Q_PROPERTY(QVariantList availableValuesOfMyEnum ...)
public:
enum MyEnum {
My