QObject generic signal handler

后端 未结 3 1948
没有蜡笔的小新
没有蜡笔的小新 2021-02-02 03:24

(With \"signal handler\" I mean slots, not handlers for POSIX signals.)

I need to \"connect\" (probably not using QObject::connect directly)

3条回答
  •  灰色年华
    2021-02-02 04:19

    You can make a generic dispatch per argument, and about the SLOT/SIGNAL they are just strings so it's not problem to forge them. It's all about making one template function that will pass per argument into the the dispatch and merge all the results. This can even have unlimited number of arguments if you use c++11.

提交回复
热议问题