1 Attachment(s)
Looking for a Widget Similar to QListWidget
Hi,
Is there a widget that's similar to a QListWidget, except that each item in the list has a checkbox as well? There doesn't seem to be one in the main set of widget's provided, but is there something like this online I could copy? (Or is there a really quick way to create one from scratch?)
I've included a picture to better describe what I'm looking for. The list on the left is what I would like to create in my program.
Re: Looking for a Widget Similar to QListWidget
No there isn't yet, but you could take a look at QxtCheckComboBox from the QxtGui package.
It does exactly what you want, except it is a combo box.
Maybe you can port it in a list widget?
Regards
Re: Looking for a Widget Similar to QListWidget
Quote:
Originally Posted by
marcel
No there isn't yet, but you could take a look at QxtCheckComboBox from the QxtGui package.
It does exactly what you want, except it is a combo box.
Maybe you can port it in a list widget?
Regards
Hmm, that is very close to what I'm looking for. It seems like from reading other threads that you can insert QListWidgetItems that are checkable into QListWidgets. I'll have to investigate this further.
Re: Looking for a Widget Similar to QListWidget
Oh, yes, damn it! :)
Add this to the item flags: Qt::ItemIsUserCheckable.
This will make the items checkable.
Then you have QListWidgetItem::setCheckState and checkState.
Regards
1 Attachment(s)
Re: Looking for a Widget Similar to QListWidget
stealth86,
Here is an example using model -> treeview.
Hope this helps.
Junior