I'd make a page for that: PullDownMenu { MenuItem { text: 'Settings' onClicked: pageStack.push(Qt.resolvedUrl('Campuses.qml')) } }
And then have a SilicaListView with the campuses in Campuses.qml. On Tuesday 26 November 2013 20:32 Lauri Lavanti wrote: > Okay. > > The use case is, that I have a simple setting (the campus the user's on) > and I'd like to have him be able to change it on the fly from a simple > list, even though it doesn't need to be visible all the time > > -- > Lauri Lavanti > laurilava...@gmail.com > ------------------------------ > Lähettäjä: Martin Jones > Lähetetty: 27.11.2013 3:28 > Vastaanottaja: Sailfish OS Developers > Aihe: Re: [SailfishDevel] ContextMenu inside a PullDownMenu > > Hi, > > This will not work and I can’t imagine this case being made to work in the > future. The pulley menus are designed to be pulled down to highlight an > option and released to select. A ContextMenu/ComboBox inside a pulley menu > is incompatible with the interaction design of the pulley menu. > > Perhaps you could explain the use case you’re trying to accomplish and we > could suggest an alternative, or pass some feedback on to our designers. > > Best Regards, > Martin. > > On 26 Nov 2013, at 10:07 pm, Lauri Lavanti <laurilava...@gmail.com> wrote: > > 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 > laurilava...@gmail.com > > > > ------------------------------ > <http://www.avast.com/> > > Tässä sähköpostiviestissä ei ole viruksia eikä haittaohjelmia, koska avast! > Antivirus <http://www.avast.com/> suojaus on käytössä. > > _______________________________________________ > SailfishOS.org <http://sailfishos.org/> Devel mailing list -- Med venlig hilsen / Best Regards Thomas Tanghus _______________________________________________ SailfishOS.org Devel mailing list