QString str1 = "Hello"; QString str2 = " World!"; QString str3 = str1 + str2; qDebug() << str3;
QString str = "Hello World!"; QStringList list = str.split(" "); qDebug() << list;This code creates a QString object and splits it into a list of strings using the space delimiter. The resulting QStringList object is printed to the console using the qDebug() function. These examples are part of the QT library.