isEmpty

Returns true if the string has no characters; otherwise returns false.

 QString().isEmpty();            // returns true
 QString("").isEmpty();          // returns true
 QString("x").isEmpty();         // returns false
 QString("abc").isEmpty();       // returns false

isNull

Returns true if this string is null; otherwise returns false.

 QString().isNull();             // returns true
 QString("").isNull();           // returns false
 QString("abc").isNull();        // returns false

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2022-01-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
相关资源
相似解决方案