mardi 18 septembre 2018

Qt5: connect: How to use 'connect' in case the slot has less parameters than the signal

Task is to connect from one signal with one parameter to a slot with zero parameters. With the "old" Qt4-way of connect it works like this

connect(object1, SIGNAL(signal(int param)), object2, SLOT(slot()))

But what if I want to use the type-safe Qt5-connects?

The documentation just mentions the cases with:

  • connect to default parameters in slot

  • and using the above-mentioned way of the stringbased connect.

Aucun commentaire:

Enregistrer un commentaire