Knut Helper

class KnutHelper : public QObject

KnutHelper provides some convenient functions useful for QML items.

This class provides some functions which are useful to use in QML items to shift work load to the C++ side of the application.

Property

property KnutHelper::time

This property holds the current system time.

Note: The time is updated only every seconds and is therefore not very precise.

Public Static Functions

QString formatDateTime(const QDateTime &dateTime, const QString &format)

Returns the dateTime as string formatted in format.

Note that this method is a wrapper for the QDateTime::toString() method. For more details on format please see QDateTime::toString().

Note: This function can be invoked via the meta-object system and from QML.

See

QDateTime::toString()

QString toStringFromSecs(const int &s, const QString &format)

Returns the s seconds as string formatted in format.

Converts the seconds s into a QTime and formats it using QTime::toString(). For format options please see QTime::toString().

Note: This function can be invoked via the meta-object system and from QML.

See

QTime::toString()