[SailfishDevel] ContextMenu inside a PullDownMenu

Lauri Lavanti laurilavanti at gmail.com
Tue Nov 26 12:07:03 UTC 2013


Hi,

 

I’m hoping I’m not the only one who’s been trying something like this and
even more so I hope there’s a solution for it:

I’ve been trying to get a ContextMenu inside the PullDownMenu with code like
this:
PullDownMenu {

            MenuItem {

                ComboBox {

                    width: page.width

                    label: "Kampus: "

 

                    menu: ContextMenu {

                        id: menu

                        Repeater {

                            model: ["Kaikki", "Otaniemi", "Töölö", "Arabia",

                                "Kumpula", "Keskusta", "Kallio", "Viikki"]

                            MenuItem {

                                text: modelData

                                onClicked: { kampus = modelData }

                            }

                        }

                    }

            }

}

Buut, it doesn’t do anything when selected, another thing I did was try to
replace the MenuItem with the ComboBox straight, but of course that didn’t
do squat. I’ve also tried to insert the ContextMenu straight to the MenuItem
buuut that keeps telling me I can’t (surprise).

 

So, any pointers/tips/solutions?

 

--

Lauri Lavanti

laurilavanti at gmail.com

 



---
avast! Antivirus käynnissä, joten tässä sähköpostiviestissä ei ole viruksia tai haittaohjelmia.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131126/7709e65e/attachment.html>


More information about the Devel mailing list