It is currently Thu Dec 13, 2018 3:27 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: [QT] How to use enumeration in QML?
PostPosted: Sun Aug 19, 2018 1:07 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue May 28, 2013 10:51 pm
Posts: 531
Location: Europe
http://doc.qt.io/qt-5/qml-enumeration.html

Quote:
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:
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?

_________________
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Bitblazer and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye