QCString str("HELLO WORLD"); str = str.lower(); cout << str; // Output: hello world
QCString str = "HeLLo WoRlD"; for (int i = 0; i < str.length(); i++) { str[i] = tolower(str[i]); } cout << str; // Output: hello worldThis example uses a for loop to convert each character of the string to lowercase using the tolower() function. The QCString lower method belongs to the Qt Core package library.