Using any c++ function as a Qt slot

后端 未结 5 1164
太阳男子
太阳男子 2021-01-17 11:54

Is there a way to use any C++ function as a Qt slot, without having its class inheriting from QWidget?

5条回答
  •  渐次进展
    2021-01-17 12:39

    It is enough to inherit QObject: http://qt-project.org/doc/qt-4.8/signalsandslots.html

提交回复
热议问题