Random number or random string with qt
RIVOPICO last edited by
Hi some way to get a random number or string with Qt. I want that these elements dont repeat to get totally random strings or numbers. Any idea it's good received thx.
There is big difference between a random string and just a random number?
Anyway, fast way is just
MyNum = QString::number( rVal ) ;
If you want truly unique ID, you can use
So solution also depends on how many you will generate and
how unique it must be. Also over time.