Can not change firstDayOfWeek of calendar in qml
Unsolved
QML and Qt Quick
-
In Calendar qml doc http://doc.qt.io/qt-5/qml-qtquick-controls-calendar.html#dayOfWeekFormat-prop i do not see any property to change the firstDayOfWeek. So i look into calendar.qml source code and i saw a property __locale
/*! The locale that this calendar should use to display itself. Affects how dates and day names are localized, as well as which day is considered the first in a week. To set an Australian locale, for example: \code locale: Qt.locale("en_AU") \endcode The default locale is \c Qt.locale(). */ property var __locale: Qt.locale()
An object created by Qt.locale() will have a property firstDayOfWeek
http://doc.qt.io/qt-5/qml-qtqml-locale.html#firstDayOfWeek-propI want to change the first day of week of a calendar so i set
Calendar { id: cal Component.onCompleted: { cal.__locale.firstDayOfWeek = Locale.Tuesday; } }
But the firstDayOfWeek do not change
Can anyone tell me what did i do wrong ?
Is there any other ways to change the firstDayOfWeek of calendar in qml ?