#includeint main() { QString text = "Hello, world!"; // ... return 0; }
#includeint main() { QString text = "Hello, "; text.append("world!"); // ... return 0; }
#includeThe QString class is part of the Qt Core library, which is included in the Qt framework. Therefore, to use QString, you need to have the Qt library installed and linked in your C++ project.#include int main() { QString text = "apple,banana,orange"; QStringList fruits = text.split(","); // fruits = {"apple", "banana", "orange"} // ... return 0; }