How to write qml signal Variadic arguments
-
wrote on 17 May 2016, 12:52 last edited by
I want to write a qml signal that takes n QString arguments ( foo(QString, ...) which the slot will be on the CPP side.
Thanks
-
I want to write a qml signal that takes n QString arguments ( foo(QString, ...) which the slot will be on the CPP side.
Thanks
@FlacoDanziger
As far as my knowledge of Qt goes, which is pretty decent, you can't ... and you shouldn't. If you want to send a number ofQString
s useQStringList
. A signal-slot connection is a bit more than a regular function call and variadic arguments can't be packed (when you have queued connections for example). Not to mention it's a type safety nightmare ... -
@FlacoDanziger
As far as my knowledge of Qt goes, which is pretty decent, you can't ... and you shouldn't. If you want to send a number ofQString
s useQStringList
. A signal-slot connection is a bit more than a regular function call and variadic arguments can't be packed (when you have queued connections for example). Not to mention it's a type safety nightmare ...wrote on 17 May 2016, 17:06 last edited by@kshegunov thanks
2/3