diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index 759ef37c322..d2fd572b699 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -1151,10 +1151,10 @@ QString QPropertyBindingError::description() const QPropertyAlias nameAlias(name); QPropertyAlias ageAlias(&age); - QPropertyAlias fullname; - fullname.setBinding([&]() { return nameAlias.value() + " age:" + QString::number(ageAlias.value()); }); + QProperty fullname; + fullname.setBinding([&]() { return nameAlias.value() + " age: " + QString::number(ageAlias.value()); }); - qDebug() << fullname.value(); // Prints "Smith age: 41" + qDebug() << fullname.value(); // Prints "John age: 41" *name = "Emma"; // Marks binding expression as dirty