KDE 4.7 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KRandom Namespace Reference

from PyKDE4.kdecore.KRandom import *

Detailed Description

Helper class to create random data

This namespace provides methods which generate random data.


Functions

int random ()
QString randomString (int length)

Function Documentation

int random (   )

Generates a uniform random number.

Returns:
A random number in the range [0, RAND_MAX). The RNG is seeded on first use.

QString randomString ( int  length
)

Generates a random string. It operates in the range [A-Za-z0-9]

Parameters:
length  Generate a string of this length.

Returns:
the random string

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal