Page 1 of 1

[QT] How to use enumeration in QML?

Posted: Sun Aug 19, 2018 1:07 pm
by bbanelli
http://doc.qt.io/qt-5/qml-enumeration.html
For backwards compatibility, the enumeration value may also be specified as a string, e.g. "AlignRight". This form is not recommended for new code.
This actually works just fine, i.e.:

Code: Select all

If OpenWindow(0, 0, 0, 322, 205, "qt placeholder", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  StringGadget(0, 8,  10, 306, 20, "123")
  StringGadget(1, 8,  40, 306, 20, "456")
  QtScript(~"gadget(0).echoMode = \"PasswordEchoOnEdit\";")
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
However, what would be the proper way to use it according to the docs?