Questions tagged «qt-slot»

5
将参数传递到插槽
我想用一堆QActions和QMenus覆盖mouseReleaseEvent ... connect(action1, SIGNAL(triggered()), this, SLOT(onStepIncreased())); connect(action5, SIGNAL(triggered()), this, SLOT(onStepIncreased())); connect(action10, SIGNAL(triggered()), this, SLOT(onStepIncreased())); connect(action25, SIGNAL(triggered()), this, SLOT(onStepIncreased())); connect(action50, SIGNAL(triggered()), this, SLOT(onStepIncreased())); 因此,我想将参数传递给广告位onStepIncreased(您可以想象它们是1,5,10,25,50)。你知道我该怎么做吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.