#includeint main() { QAtomicString str; // create an empty string if (str.isNull()) { qDebug() << "String is null"; } return 0; }
#includeIn this example, we create a non-empty string and use the isNull() function to check if it's null. Since the string is not empty, the function returns false and the message "String is not null" is printed to the console.int main() { QAtomicString str("hello"); // create a non-empty string if (!str.isNull()) { qDebug() << "String is not null"; } return 0; }