Qt: dynamic widgets signal and slot connection

后端 未结 2 593
借酒劲吻你
借酒劲吻你 2020-12-20 01:27

In my Qt app, I create some of my widgets dynamically. Among them are QToolButtons that need to have a similar behavior.

Here is how the widgets are created:

2条回答
  •  半阙折子戏
    2020-12-20 02:04

    Although using QObject::sender() is perfectly fine, the idealistic approach would be QSignalMapper

提交回复
热议问题