diff options
Diffstat (limited to 'examples/corelib/bindableproperties/bindablesubscription/bindableuser.h')
-rw-r--r-- | examples/corelib/bindableproperties/bindablesubscription/bindableuser.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/corelib/bindableproperties/bindablesubscription/bindableuser.h b/examples/corelib/bindableproperties/bindablesubscription/bindableuser.h index b7e44d52ec..d172a7cb22 100644 --- a/examples/corelib/bindableproperties/bindablesubscription/bindableuser.h +++ b/examples/corelib/bindableproperties/bindablesubscription/bindableuser.h @@ -4,6 +4,7 @@ #ifndef BINDABLEUSER_H #define BINDABLEUSER_H +#include <QLocale> #include <QProperty> //! [bindable-user-class] @@ -11,13 +12,9 @@ class BindableUser { public: - enum Country { - None, - Finland, - Germany, - Norway, - }; + using Country = QLocale::Territory; +public: BindableUser() = default; BindableUser(const BindableUser &) = delete; @@ -30,7 +27,7 @@ public: QBindable<int> bindableAge() { return &m_age; } private: - QProperty<Country> m_country { None }; + QProperty<Country> m_country { QLocale::AnyTerritory }; QProperty<int> m_age { 0 }; }; |