[Interest] Are slots even needed these days?

Thiago Macieira thiago.macieira at intel.com
Thu Mar 17 16:36:39 CET 2016


On quinta-feira, 17 de março de 2016 08:23:48 PDT 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 could do it in a round-about way in Qt 4 by using 
QMetaObject::invokeMethod.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list