Using any c++ function as a Qt slot

后端 未结 5 1101
太阳男子
太阳男子 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:35

    Unlikely. The Qt-meta-object-compiler (moc) wraps the function, are marked as slot-s, in relatively large code-wrapper. Files, created by moc, begin with moc_, look them.

提交回复
热议问题