PDA

View Full Version : How to emit signal when total items count reaches a threshold in QListWidget



sargeslash
8th February 2013, 15:03
How can I get a signal when total items added in a QListWidget reaches a threshold(say listbox.count()=8)?
Also is there any way to limit number of items to be added in a QListWidget (such as a max limit or something)?

Lykurg
8th February 2013, 15:47
Subclass QListWidget, reimp all insert* and add* and add your counting mechanism.

sargeslash
11th February 2013, 13:04
Thanks a lot, working in that direction