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 in a label. Sure, we can use a spin 
box also. But the point is that such a use case is not inconceivable. Another 
example: we might want to offer color selection on a color palette, but show 
its name in a label OR its RGB values in 3 separate labels (or line edits).

> But let's say we're connecting a slider to a QProgressBar. You can  just 
> write:
> 
> QObject::connect(slider, &QSlider:valueChanged, &progressBar, 
> &QProgressBar::setValue);

Yes, of course. I suggest QObject::bind() for other cases.

We have classes with properties having notification signals, but they don’t 
emit the changed value as parameter in the signal. I am not talking about 
classes in Qt library, but other Qt based libraries. For such classes 
QObject::bind() would be useful, I think.

Thanks,
Prashanth

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to