[Qt-qml] Is there a way to randomize the display of items in views

Shady Zayat shady at zoogylabs.com
Thu Jul 22 11:24:43 CEST 2010


I am using a Row and a Repeater to display data from a ListModel. Is there a
way to randomize the order of the displayed elements? I'm implementing radio
group behavior for multiple-choice questions for a learning application (
"Choice" is a kind of a radio button  ). I need the choices to be displayed
in a random order.

      Row {

        id: choicesRow

        spacing: 10

        Repeater {

            model: elementChoices

            Choice {

                id: choice

                text: choiceText

                onButtonChecked: root.uncheckOthers(choice)

            }

        }

    }

-- 
Shady Zayat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100722/0da94150/attachment.html 


More information about the Qt-qml mailing list