I solved it. If context menu length > 6 it becomes dialog, and after choosing dialog item fired only onItemChanged signal, not onIndexChanged. With short combobox everything fine :)

You can mark it as found bug ;)

On 05.01.2014 18:15, Oleksii Serdiuk wrote:
Did you try using `model.index` instead of just `index`?

Are you sure that onClicked signal in MenuItem gets fired?

On 03.01.2014 16:21, Andrey Kozhevnikov wrote:
Hello

I can't get context menu index if using repeater inside

             ComboBox {
                 id: languageCombo
                 label: "Language"
                 currentIndex: 0
                 menu: ContextMenu {
                     id: languageMenu
                     Repeater {
                         width: parent.width
                         model: localeNames
                         delegate: MenuItem {
                             text: modelData
                             onClicked: {
                                 console.log("selected: " + modelData)
                                 console.log("selected: " + index)
                             }
                         }
                     }
                     onActiveChanged: {
                         console.log("index: " +
languageCombo.currentIndex)
                     }
                 }
                 onCurrentIndexChanged: {
                     if (languageMenu.active) {
                         console.log(index: " + currentIndex)
                     }
                 }
             }

No output is produced when i selecting item, but item in repeater changed.



_______________________________________________
SailfishOS.org Devel mailing list

_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to