Results 1 to 3 of 3

Thread: How to emit signal when total items count reaches a threshold in QListWidget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2012
    Posts
    23
    Thanks
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60

    Default How to emit signal when total items count reaches a threshold in QListWidget

    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)?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to emit signal when total items count reaches a threshold in QListWidget

    Subclass QListWidget, reimp all insert* and add* and add your counting mechanism.

  3. #3
    Join Date
    Nov 2012
    Posts
    23
    Thanks
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60

    Default Re: How to emit signal when total items count reaches a threshold in QListWidget

    Thanks a lot, working in that direction

Similar Threads

  1. how to count total numbers items in listwidget
    By trupti in forum Qt Programming
    Replies: 7
    Last Post: 21st January 2011, 13:08
  2. QListWidget - signal when items are added/removed
    By Andrej08 in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2011, 03:13
  3. How to get count of items in QListView column?
    By qt-closer in forum Qt Programming
    Replies: 3
    Last Post: 25th October 2010, 15:40
  4. qlistwidget count of selected items
    By tpf80 in forum Newbie
    Replies: 4
    Last Post: 10th December 2009, 14:31
  5. Replies: 4
    Last Post: 18th May 2006, 18:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.