[][src]Function qt_core::qsrand

pub unsafe fn qsrand(seed: c_uint)

Thread-safe version of the standard C++ srand() function.

Calls C++ function: void qsrand(unsigned int seed).

C++ documentation:

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().

The sequence of random numbers generated is deterministic per thread. For example, if two threads call qsrand(1) and subsequently call qrand(), the threads will get the same random number sequence.

This function was introduced in Qt 4.2.

See also qrand().