Código C++:
Ver originalQString Utils::ucfirst(const QString str) {
if (str.size() < 1) {
return "";
}
QStringList tokens = str.split(" ");
QList<QString>::iterator tokItr = tokens.begin();
for (tokItr = tokens.begin(); tokItr != tokens.end(); ++tokItr) {
(*tokItr) = (*tokItr).at(0).toUpper() + (*tokItr).mid(1);
}
return tokens.join(" ");
}
http://www.qtforum.org/article/27113/howto-upper-case-first-letter-from-every-word-in-string.html?6c6d9b9f#post93899