[Interest] Are slots even needed these days?

André Pönitz apoenitz at t-online.de
Thu Mar 17 18:41:14 CET 2016


On Thu, Mar 17, 2016 at 08:23:48AM +0300, Constantin Makshin wrote:
> Another thing I personally don't like in the new connection syntax is
> that it forces signals to be public, making it possible to do all type
> of wonders by faking/simulating events on behalf of other objects.
> 
> For example:
> QLineEdit* edit = new QLineEdit("foo");
> // ...
> edit->textChanged("bar");

You can trigger that emission in Qt 4, too, e.g. using
QMetaObject::invokeMethod(edit, "textChanged", ...)

Andre'




More information about the Interest mailing list