[SailfishDevel] Select multiple values in combobox

Kimmo Lindholm Kimmo.Lindholm at eke.fi
Mon Feb 22 22:00:10 UTC 2016


Something like this? http://kimmoli.com/tauhkaa/20160222235612.png 

Dialog https://github.com/kimmoli/maira/blob/master/qml/components/MultiItemPicker.qml
is called from this https://github.com/kimmoli/maira/blob/master/qml/fields/MultiSelectField.qml 

ListModel items contains stuff that is passed to the dialog. It is created on Component.onCompleted, you'll need to tune that for your needs.
indexes array contains selected ListModel indexes.

Also, what you do when dialog is accepted, is up to you.

-kimmo

-----Original Message-----
From: devel-bounces at lists.sailfishos.org [mailto:devel-bounces at lists.sailfishos.org] On Behalf Of Erik Lundin
Sent: 22. helmikuuta 2016 22:51
To: devel at lists.sailfishos.org
Subject: Re: [SailfishDevel] Select multiple values in combobox

Thanks. I may try that solution, though it feels like it should be 
possible to make some kind of list view where you can press items to 
toggle highlight of them.

/Erik

Den 2016-02-22 kl. 04:24, skrev Andrey Kozhevnikov:
> Yes, i did following for my application:
> https://github.com/CODeRUS/powermenu2/blob/master/gui/qmls/pages/ConfigurationPage.qml#L163
>
>
> ------ Исходное сообщение ------
> От: "Erik Lundin" <erik at lists.lun.nu>
> Кому: devel at lists.sailfishos.org
> Отправлено: 22.02.2016 2:49:38
> Тема: [SailfishDevel] Select multiple values in combobox
>
>> Is it possible make a QML combobox accept multiple selected values? I
>> have tried to look in both the Silica documentation [1] and the Qt
>> documentation [2] but haven't found and answer. Maybe a listview can
>> do it?
>>
>> /Erik
>>
>> [1]
>> https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-combobox.html/
>>
>> [2] http://doc.qt.io/qt-5/qml-qtquick-controls-combobox.html
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
>> devel-unsubscribe at lists.sailfishos.org
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org


More information about the Devel mailing list