#includeQString str = "hello world";
#includeQString str1 = "hello"; QString str2 = "world"; QString concatenated = str1 + " " + str2; // concat using + operator
#includePackage library: Qt#include QString str = "hello"; std::string stdStr = str.toStdString(); std::cout << stdStr << std::endl; // prints hello