Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] How to tell if QListWidget is empty
QtWS25 Last Chance

[Solved] How to tell if QListWidget is empty

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 5.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kbt90
    wrote on last edited by
    #1

    Hello -

    I've looked through the Qt Documentation, but can't seem to find a way to tell if a QListWidget is empty. Is there a way to do so, and, if so, how?

    Thanks,
    Kate

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      I really do spot a count property... I wonder what that does...

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kbt90
        wrote on last edited by
        #3

        Thanks! I completely missed that.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          You could check "count() == 0":http://doc.qt.nokia.com/4.7/qlistwidget.html#count-prop

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved