QByteArray str = "hello world"; str = str.toUpper(); // str now contains "HELLO WORLD"
QByteArray str = "1234abcd"; str = str.toUpper(); // str now contains "1234ABCD"This example demonstrates that toUpper() can also be used to convert lowercase letters in a string of mixed characters to uppercase. Package Library: QByteArray is a part of the Qt Core library, which is included in the Qt framework.