Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

Supply my own parameter (different from the Signal) to the Slot

$
0
0
I would like to supply my own parameter (different from the Signal) to the Slot. I know this code doesn’t work, but perhaps it illustrates the idea of what I am trying to accomplish. QAction* a; a = new QAction(this); connect(action, SIGNAL(triggered()), this, SLOT(setFoo(1.0f))); a = new QAction(this); connect(action, SIGNAL(triggered()), this, SLOT(setFoo(2.0f))); Is this possible, or what would you have done when faced with similar problem?

Viewing all articles
Browse latest Browse all 22112


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>