C

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.


Available under certain Qt licenses.
Find out more.