pub unsafe fn qrand() -> c_int
Expand description
Thread-safe version of the standard C++ rand()
function.
Calls C++ function: 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().