Passing an argument to a slot

后端 未结 5 2555
灰色年华
灰色年华 2020-11-22 16:15

I want to override mouseReleaseEvent with a bunch of QActions and QMenus...

connect(action1, SIGNAL(triggered()), this, SLOT(onStepIncreased()));

connect(ac         


        
5条回答
  •  臣服心动
    2020-11-22 17:05

    The QObject::sender() function returns a pointer to the object that has signaled to the slot. You could use this to find out which action was triggered

提交回复
热议问题