On Fri, Mar 24, 2017 at 12:50 AM, Thiago Macieira <thiago.macie...@intel.com > wrote:
> > The new value is already carried by the signal. We don't need the getter: > my > code examples already compile. > I really think that we do. For instance in the following code: #include <QApplication> #include <QLabel> #include <QVBoxLayout> #include <QLineEdit> int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget w; QVBoxLayout lay; QLabel label; QLineEdit text{"Some text"}; lay.addWidget(&label); lay.addWidget(&text); QObject::connect(&text, &QLineEdit::textChanged, &label, &QLabel::setText); w.setLayout(&lay); w.show(); return a.exec(); } when running the application, the label has no text, and takes the lineedit's text only when the lineedit changes. Instead, with QtQuick: import QtQuick 2.0 import QtQuick.Controls 2.0 Rectangle { Column { Text { text: edit.text } TextField { id: edit text: "Some text" } } } when the application starts, the label is already set at "Some text" through the binding > Why? We have a perfectly working method that uses PMFs and delivers to callables, without additional magic. Because I'm getting wrist pain every time I have to type &QSomething:: and the same safety can be achieved. I assumed C++17 would be okay because when compiling qt I see a lot of std=C++1z. Of course, reactive bindings like the ones provided by Olivier Goffart are even better from a programming quality standpoint, but requires bigger changes in user code.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest