sedi
14th April 2016, 12:58
Hi,
I have a Text Item that uses different kinds of Alignment and must be able to take this information from a C++ model. For example, I want to be able to set:
delegate: Text {
verticalAlignment: model.alignment // Text.AlignVCenter, Text.AlignTop or Text.AlignBottom
...
}
I have not found anything about this in the docs (there is some stuff for "the other way 'round", for exposing c++ enums to QML of course)
Is there a "best practice" for handling this problem?
I have a Text Item that uses different kinds of Alignment and must be able to take this information from a C++ model. For example, I want to be able to set:
delegate: Text {
verticalAlignment: model.alignment // Text.AlignVCenter, Text.AlignTop or Text.AlignBottom
...
}
I have not found anything about this in the docs (there is some stuff for "the other way 'round", for exposing c++ enums to QML of course)
Is there a "best practice" for handling this problem?