Qt signal slot same class

broken image

catches problems at compile time rather than runtime.allows implicit conversion of arguments.

broken image

The first really nice thing about Qt5 is that we can move away from the classic SIGNAL() and SLOT() macros to using method pointers. Getting rid of SIGNAL() and SLOT() macros This avoids having to declare a method in your class declaration and shortens your implementation code. Thanks to C++11 lambdas and Qt’s ongoing evolution, these short slots can be replaced by a more succinct syntax. In this case you have to search for it textually.) If I’m about to modify a slot function I might take an extra minute to look around since most IDEs can’t tell syntactically where it’s used in a SLOT() macro.

broken image

This way I know at a glance what the intent is. 2000) where signals are named signalFoo() and slots are named slotFoo(). ( Aside: If you are wondering about my naming convention, I developed a style when using Qt early on (c.

broken image