Am Fri, 24 Mar 2017 10:52:47 +0100
schrieb Jean-Michaël Celerier :
> On Fri, Mar 24, 2017 at 12:50 AM, Thiago Macieira > 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.
>
On 23/03/2017 23:57, Thiago Macieira wrote:
On quarta-feira, 22 de março de 2017 16:09:25 PDT Alejandro Exojo wrote:
The challenge is executing a lambda or a slot when any of the depending
properties changes. That's what the QML engine has, and what Olivier
blogged about in 2013:
https://wobo
On Fri, Mar 24, 2017 at 12:50 AM, Thiago Macieira 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
#include
#include
#include
int main(int arg
On quarta-feira, 22 de março de 2017 16:09:25 PDT Alejandro Exojo wrote:
> The challenge is executing a lambda or a slot when any of the depending
> properties changes. That's what the QML engine has, and what Olivier
> blogged about in 2013:
>
> https://woboq.com/blog/property-bindings-in-cpp.htm
On quarta-feira, 22 de março de 2017 03:26:21 PDT André Somers wrote:
> That's not quite true. First of all, you are not referencing the getter
> in the example above. Then, a ::bind would also initialize the receivers
> value to the current value. Qt::connect does not do that. Also, a ::bind
> sug
On quarta-feira, 22 de março de 2017 05:50:47 PDT Jean-Michaël Celerier wrote:
> > QObject::bind(sender, &Sender::signalName, receiver, &Receiver::setter);
> >
> > This is exactly connect() we already have.
>
> I think that bind adds one more step : it does the set. ie. bind would be :
>
>
On Tuesday 21 March 2017 23:49:17 Thiago Macieira wrote:
> So we need the compile-time checking. What can we use to identify the
> property changing? A read-only property that changes has two C++
> identifiers: the getter and the notify signal. And what can we use to
> identify the receiving prope
> QObject::bind(sender, &Sender::signalName, receiver, &Receiver::setter);
> This is exactly connect() we already have.
I think that bind adds one more step : it does the set. ie. bind would be :
QObject::bind(sender, &Sender::signalName, &Sender::getter, receiver,
&Receiver::setter);
and
>> This is exactly connect() we already have.
>>
> That's not quite true. First of all, you are not referencing the getter
> in the example above. Then, a ::bind would also initialize the receivers
> value to the current value. Qt::connect does not do that. Also, a ::bind
> suggests that the conne
Op 22/03/2017 om 07:49 schreef Thiago Macieira:
> Em terça-feira, 21 de março de 2017, às 22:58:38 PDT, Thiago Macieira
> escreveu:
>> Em terça-feira, 21 de março de 2017, às 19:38:19 PDT, Prashanth Udupa
>>
>> escreveu:
>>> QSlider *slider = ...
>>> QLabel *label =
>>> QObject::bind(slider
Hi Thiago,
> But let me put it this way: will not accept new text-based API for signal,
> slots and properties in QObject. You can do that externally, as you've done
> it, but I won't take it in QtCore.
Ok.
> So we need the compile-time checking. What can we use to identify the
> property
> c
Em terça-feira, 21 de março de 2017, às 22:58:38 PDT, Thiago Macieira
escreveu:
> Em terça-feira, 21 de março de 2017, às 19:38:19 PDT, Prashanth Udupa
>
> escreveu:
> > QSlider *slider = ...
> > QLabel *label =
> > QObject::bind(slider, "value", label, "text”);
>
> This is a bad example be
Hi Thiago,
> This is a bad example because "text" is a string and would require a
> conversion.
True, but it is something that comes up a lot in applications. For instance, I
want to allow users to (say) alter opacity using a slider. As the user changes
opacity, I might want to show that value
Em terça-feira, 21 de março de 2017, às 19:38:19 PDT, Prashanth Udupa
escreveu:
> QSlider *slider = ...
> QLabel *label =
> QObject::bind(slider, "value", label, "text”);
This is a bad example because "text" is a string and would require a
conversion. But let's say we're connecting a slider
Hello All,
QML offers property binding, which is supremely useful. So, in a QML code like
this
Item {
id: oneItem
width: anotherItem.width * 2
}
Whenever anotherItem’s width changes, oneItem’s width is recomputed.
From what I have seen we don’t have a direct way to make this kind of thi
15 matches
Mail list logo