Fix QProperty example so that comments match implementation
The comments in the QProperty examples slightly mismatched the implementation. This patch fixes it. Change-Id: I03cfb35c024fad8ea4eaa5d5db220e1907f06bc3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3fbf922cc5925a13fbfadfe1f5fa8312209c097a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
391dc40bd2
commit
fd492d460f
@ -704,7 +704,7 @@ QString QPropertyBindingError::description() const
|
||||
QProperty<int> age(41);
|
||||
|
||||
QProperty<QString> fullname;
|
||||
fullname.setBinding([&]() { return firstname.value() + " " + lastname.value() + " age:" + QString::number(age.value()); });
|
||||
fullname.setBinding([&]() { return firstname.value() + " " + lastname.value() + " age: " + QString::number(age.value()); });
|
||||
|
||||
qDebug() << fullname.value(); // Prints "John Smith age: 41"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user