[Interest] Is there any plan to make property binding working in C++?

Xavier Bigand flamaros.xavier at gmail.com
Mon May 9 12:19:03 CEST 2016


We do something similar but with few optimizations, like lazy and on memory
management.

2016-05-09 10:36 GMT+02:00 Samuel Gaist <samuel.gaist at edeltech.ch>:

>
> On 9 mai 2016, at 10:32, Jean-Michaƫl Celerier <
> jeanmichael.celerier at gmail.com> wrote:
>
> >
> > On Mon, May 9, 2016 at 7:41 AM, Thiago Macieira <
> thiago.macieira at intel.com> wrote:
> >
> > We already have one, it's called QObject::connect.
> >
> > To be faire, to emulate property binding, I think that you also have to
> set the current value upon connection.
> > Which isn't straightforward if you want to do more than a trivial "set"
> operation :
> >
> > connect(model, &Model::fooChanged,
> >              this, [=] (Foo f) { this->view->setHeight(toPixels(f)); }
> >
> > this->view->setHeight(toPixels(model.foo()));
> >
> >
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
>
> Hi,
>
> There's was an interesting article about this from Olivier Goffart:
>
> https://woboq.com/blog/property-bindings-in-cpp.html
>
> Just repeating the warning here: it's not production code
>
> Cheers
> Samuel
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>


-- 
Xavier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160509/5e1eea69/attachment.html>


More information about the Interest mailing list