diff --git a/examples/corelib/bindableproperties/bindablesubscription/main.cpp b/examples/corelib/bindableproperties/bindablesubscription/main.cpp index 85d323a64e..466f487b8e 100644 --- a/examples/corelib/bindableproperties/bindablesubscription/main.cpp +++ b/examples/corelib/bindableproperties/bindablesubscription/main.cpp @@ -14,6 +14,8 @@ #include #include +using namespace Qt::StringLiterals; + int main(int argc, char *argv[]) { QApplication a(argc, argv); @@ -25,38 +27,38 @@ int main(int argc, char *argv[]) // when subscription is out of scope so is window // Initialize subscription data - QRadioButton *monthly = w.findChild("btnMonthly"); + QRadioButton *monthly = w.findChild(u"btnMonthly"_s); QObject::connect(monthly, &QRadioButton::clicked, monthly, [&] { subscription.setDuration(BindableSubscription::Monthly); }); - QRadioButton *quarterly = w.findChild("btnQuarterly"); + QRadioButton *quarterly = w.findChild(u"btnQuarterly"_s); QObject::connect(quarterly, &QRadioButton::clicked, quarterly, [&] { subscription.setDuration(BindableSubscription::Quarterly); }); - QRadioButton *yearly = w.findChild("btnYearly"); + QRadioButton *yearly = w.findChild(u"btnYearly"_s); QObject::connect(yearly, &QRadioButton::clicked, yearly, [&] { subscription.setDuration(BindableSubscription::Yearly); }); // Initialize user data - QPushButton *germany = w.findChild("btnGermany"); + QPushButton *germany = w.findChild(u"btnGermany"_s); QObject::connect(germany, &QPushButton::clicked, germany, [&] { user.setCountry(BindableUser::Country::Germany); }); - QPushButton *finland = w.findChild("btnFinland"); + QPushButton *finland = w.findChild(u"btnFinland"_s); QObject::connect(finland, &QPushButton::clicked, finland, [&] { user.setCountry(BindableUser::Country::Finland); }); - QPushButton *norway = w.findChild("btnNorway"); + QPushButton *norway = w.findChild(u"btnNorway"_s); QObject::connect(norway, &QPushButton::clicked, norway, [&] { user.setCountry(BindableUser::Country::Norway); }); - QSpinBox *ageSpinBox = w.findChild("ageSpinBox"); + QSpinBox *ageSpinBox = w.findChild(u"ageSpinBox"_s); QBindable ageBindable(ageSpinBox, "value"); user.bindableAge().setBinding([ageBindable](){ return ageBindable.value();}); - QLabel *priceDisplay = w.findChild("priceDisplay"); + QLabel *priceDisplay = w.findChild(u"priceDisplay"_s); // Track price changes //! [update-ui]