TimezonesFilter QML Type

Provides a filtered model for the available time zones. More...

Import Statement: import QtDeviceUtilities.TimeDateSettings 1.0

Properties

Methods

Detailed Description

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

The TimezonesFilter QML type can be used as the model in a view that lists the available time zones.

For example:

ListView {
    model: TimezonesFilter
    delegate: Text { text: name + " | " + country }
}

Available roles in the time zone model:

RoleDescription
nameDisplay name of the time zone. See QTimeZone::displayName() for details.
countryName of the country for the zone time.
idIANA time zone ID.

Property Documentation

filter : string

Holds a string that filters out the time zones in the model. The filtering process is a case-insensitive match for whether the time zone's name or country name contain 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 be assigned to TimeManager.timeZone, when the user selects a time zone from a list.


© 2024 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.