I guess it is a random character you want. For that see QChar::QChar(int code) with a random number between 97 and 122 (qrand and qsrand and the modulo operator and the +operator :-).
I guess it is a random character you want. For that see QChar::QChar(int code) with a random number between 97 and 122 (qrand and qsrand and the modulo operator and the +operator :-).
QChar::QChar(int code) between 97-122 would only return lowercase ASCII characters, which might not be sufficient in many countries. Getting a set of meaningful characters or the local alphabet might not be easy, but for any purpose the character set from which to do the random selection could be expressed as a customized QString (included with the application perhaps as a resource) and a character selected with QString::at ( int position ). Now we would generate random numbers between zero and ourCharacterSetString.size() - 1;
Bookmarks