How to check QStringList is Empty?
-
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 -
@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.