int qrand ()
Thread-safe version of the standard C++ rand() function.
Returns a value between 0 and RAND_MAX (defined in <cstdlib> and <stdlib.h>), the next number in the current sequence of pseudo-random integers.
Use qsrand() to initialize the pseudo-random number generator with a seed value.
This function was introduced in Qt 4.2.
See also qsrand().
void qsrand ( uint seed )
Thread-safe version of the standard C++ srand() function.
Sets the argument seed to be used to generate a new random number sequence of pseudo random integers to be returned by qrand().
If no seed value is provided, qrand() is automatically seeded with a value of 1.
The sequence of random numbers generated is deterministic per thread. For example, if two threads call qsrand(1) and subsequently calls qrand(), the threads will get the same random number sequence.
This function was introduced in Qt 4.2.
See also qrand().