errorHighlight: text.length == 0 is the simplest string validator. i have no idea why you need more complex solutions for such small thing.

05.10.2014 01:00, sailfishmail пишет:
Why not? I doubt you will notice any performance issues.

No need to be over zealous about optimization, you're using qml for an 
application anyways, not coding an OS or background service.

Although I agree that there should be greater variety of stock validators, for 
simpler cases with strings.

Andrey Kozhevnikov kirjoitti Sat Oct 04 2014 21:56:57 GMT+0300 (EEST):
You really need validators for text data? Adding complex RegExpValidator
just for handling empty state? Really?

05.10.2014 00:52, sailfishmail пишет:
I think the validator property will help you; search for "qml using validators" or 
similar. Or http://qt-project.org/doc/qt-4.8/texthandling.html and the "acceptableInput" 
property of TextInput.

Andrey Kozhevnikov kirjoitti Sat Oct 04 2014 21:40:48 GMT+0300 (EEST):
something like this: http://pastebin.com/Vv0PcrJA

05.10.2014 00:14, Cernunnos Wynand пишет:
Hi,

I have the following code for a dialog which will only be accepted if it
has been completely filled out: http://pastebin.com/WUpHhxJh

I find this a bit cumbersome. Does anyone have suggestions or
improvements?

Cernunnos


_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.or

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to