Create a random string or number in Qt4

前端 未结 6 576
独厮守ぢ
独厮守ぢ 2020-12-16 10:49

Is there any function or something like that by which I can create totally random strings or numbers?

6条回答
  •  不思量自难忘°
    2020-12-16 11:23

    You can create random numbers using qrand. If you need strings, you can convert the int to string. You could also check the QUuid class, which generates Universally Unique Identifiers. Those are not 'totally random', but they are unique.

提交回复
热议问题