LocaleFilter QML Type

Provides a filtered model for the available locales. More...

Import Statement: import QtDeviceUtilities.LocaleSettings 1.0

Properties

Methods

Detailed Description

There is no need to create an instance of this object. To use it, simply import the QtDeviceUtilities.LocaleSettings module.

The LocaleFilter QML type can be used as the model in a view that lists the available locales.

For example:

ListView {
    model: LocaleFilter
    delegate: Text { text: language + " | " + country }
}

Available roles in the locale model:

RoleDescription
codeLocale code string in the format language_country. See QLocale::name() for details.
countryThe name of the country. If available, the native country name is used.
languageThe name of the language. If available, the native language name is used.

See also LocaleManager.

Property Documentation

filter : string

Holds a string that filters out the locales in the model. The filtering process is a case-insensitive match for whether the region (country) name contains the filter substring; it can be taken from user input.


Method Documentation

object itemFromRow(int index)

Returns the item at index in the model. This item can assigned to LocaleManager.locale, when the user selects a locale from a list.


© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.