[Interest] Can QML model specify a range including negative numbers? For example -180 to +180 ?

Edward Sutton edward.sutton at subsite.com
Wed Nov 4 15:53:04 CET 2015


Is there a way to declare a QML model range from -180 to +180?

A method that does not require typing 361 numbers model: [-180, -179, … 0, … 179, 180 ] ?



I added a Tumbler to Combining Qt Widgets and QML with QWidget::createWindowContainer()<http://www.ics.com/blog/combining-qt-widgets-and-qml-qwidgetcreatewindowcontainer>  to experiment with making QML readable and writable from C++.



Tumbler {

    // latitude degrees -180 to +180

    TumblerColumn {

        model: 181  // <- Is there a way to declare model range -180 to +180 ?

    }

    // latitude minutes 0 - 59

    TumblerColumn {

        model: 60

    }

    // latitude seconds 0 - 59

    TumblerColumn {

        model: 60

    }

}


Thanks in advance,


-Ed

This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151104/59978dda/attachment.html>


More information about the Interest mailing list