QString str = "Hello World!";
QString str1 = "Hello"; QString str2 = "World"; QString result = str1 + " " + str2;
QString str = "The quick brown fox"; int index = str.indexOf("brown");
QString str = "Hello"; char* strData = str.toLatin1().data();This code converts the QString object to a char* array, which can be used by functions that expect null-terminated strings. The QString class is part of the Qt Core library package, which is included in the Qt Framework.