C
Qul QML Type
Provides extra utility functions and properties for Qt Quick Ultralite. More...
| Import Statement: | import QtQuickUltralite.Extras 3.0 |
| Since: | Qt Quick Ultralite 2.12 |
Properties
- activeLanguages : list<string>
(since Qt Quick Ultralite 2.12)
Detailed Description
The Qul global object provides utility functions and properties not covered by the Qt global object and is specific to the needs of the Qt Quick Ultralite.
This object is not instantiable. To use it, call its members directly. For example:
import QtQuick 2.15 import QtQuickUltralite.Extras 2.0 Item { Component.onCompleted: { console.log(Qul.activeLanguages.length, "languages are available.") } }
Property Documentation
This property holds the list of languages for which translation data is present in the deployed application resources. Although the qmlproject declares a wider list of supported languages, not all translation data need to be in the resources. For example, you can exclude translation data for certain languages from the system to reduce storage footprint. Use this property to query which languages are actually valid at runtime.
The returned list contains language identifiers derived from the names of the .ts files. These strings match the language names used for Qt.uiLanguage. If the application includes source strings, the first entry in the list is an empty string indicating the language name associated with the untranslated source strings.
Column { Repeater { model: Qul.activeLanguages.length RadioButton { text: Qul.activeLanguages[index] === "" ? "Default" : Qul.activeLanguages[index] } } }
This property was introduced in Qt Quick Ultralite 2.12.
See also Internationalization and Localization with Qt Quick Ultralite.
Available under certain Qt licenses.
Find out more.