bool QString::isEmpty () const
Returns true if the string has no characters; otherwise returns false.
Example:
QString().isEmpty(); // returns true
QString("").isEmpty(); // returns true
QString("x").isEmpty(); // returns false
QString("abc").isEmpty(); // returns false
See also size().
bool QString::isNull () const
Returns true if this string is null; otherwise returns false.
Example:
QString().isNull(); // returns true
QString("").isNull(); // returns false
QString("abc").isNull(); // returns false
Qt makes a distinction between null strings and empty strings for historical reasons. For most applications, what matters is whether or not a string contains any data, and this can be determined using the isEmpty() function.