As a sidenote: a related feature of Qt5 that is absent from Qt4.8 is the
possibility to connect signals to arbitrary functions (including
anonymous ones such as lambdas).

Pros and cons from https://wiki.qt.io/New_Signal_Slot_Syntax:

Pros
* Compile time check of the existence of the signals and slot, of the
types, or if the Q_OBJECT is missing.
* Argument can be by typedefs or with different namespace specifier, and
it works.
* Possibility to automatically cast the types if there is implicit
conversion (e.g. from QString to QVariant)
* It is possible to connect to any member function of QObject, not only
slots.

Cons
* More complicated syntax? (you need to specify the type of your object)
* Very complicated syntax in cases of overloads? (see below)
* Default arguments in slot is not supported anymore.


Reply via email to