Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to check QStringList is Empty?
Qt 6.12 LTS is out! See what's new in the release blog

How to check QStringList is Empty?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 12.2k Views 1 Watching
  • 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.
  • I Offline
    I Offline
    Indrajeet
    wrote on last edited by
    #1

    Hi All

    How to check wether QStringList is empty?

    Regards
    Indrajeet

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      isEmpty()
      http://developer.qt.nokia.com/doc/qt-4.7/qlist.html#id-8e5f8d2a-6dd7-4934-8e04-1327fc7d9ac8
      IT is included from QList rather then QStringList sometimes its worth hitting the button to look at all the classes members and methods as the api only provides detail for that class not the classes it extends from

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @Indrajeet: If you are not already using it, I highly recommend you to start using the Qt Assistant, or if you're using QtCreator, go to the help button on the bottom of the left bar. There you can get information about the whole API. And if you just go to the QStringList page, it should take you a few seconds to find the isEmpty() function. In this case, maybe you did look at the documentation of QStringList, but didn't see the function because the base class (QList) has the isEmpty() function since a QStringList is just a QList<QString> (this is shown right at the top of each class' page). You can get help here. But, you have to make an effort to solve relatively simple problems yourself.

        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
        • Unsolved