Selection List selection mode

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
denisisakovic
Posts:23
Joined: Fri May 08, 2020 10:32 am

Selection List selection mode

Post by denisisakovic »

Hello dear community,
Is it possible to change the "Selection Mode" property of the Selection List widget while runtime, ex. with the push of another button, change the selection mode of a desired Selection List in the same panel from "SingleSelection" to "MultiSelection"?
Any suggestions would be helpful!

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: Selection List selection mode

Post by adaneau »

Hi,

It doesnt seem to be possible. I see 2 solutions for you:

- Have 2 objects selection list, one single mode and other multiple mode, and make them visible/invisible via push button
- Do you own selection list via QT widget and map the missing parameter.

BR
Alex

gschijndel
Posts:376
Joined: Tue Jan 15, 2019 3:12 pm

Re: Selection List selection mode

Post by gschijndel »

You could try something like this:

Code: Select all

LIST.styleSheet = "QListWidget { qproperty-selectionMode: \"MultiSelection\"; }";

3 posts • Page 1 of 1