Qt hidden features

Or at least not talked about so often

Here they are:

  • Q_GADGET offers some meta-object features without the need to inherit QObject. Combined with Q_ENUMS it allows reflection for enums.
  • You can declare a single signal or slot by using the Q_SIGNAL and Q_SLOT macros.
  • qChecksum offers a CRC implementation.
  • qCompress / qUncompress.
  • qDeleteAll deletes each element in a container.
  • qRound does float to integer rounding.
  • qFuzzyCompare: safe compare for float and double values.
  • qVersion: Get the *runtime* qt lib version as a string value.
  • QSysInfo header: word size, endianness, OS version.
  • QtEndian header: endian conversions.
Posted on Dec 2 2009
Written by raz