[Interest] Requesting QObject::bind() method
Thiago Macieira
thiago.macieira at intel.com
Wed Mar 22 06:58:38 CET 2017
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 to a QProgressBar. You can
just write:
QObject::connect(slider, &QSlider:valueChanged,
&progressBar, &QProgressBar::setValue);
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list