PDA

View Full Version : How to emit mouse press event in QPushButton



dpatel
30th December 2010, 12:53
Hi,

I want to send pressed() event to an object of subclass of QPushButton. How can I do that. I see 'emit' keyword to emit signals, but I am not sure how to user that.
Can someone please explain me.

Thanks

high_flyer
30th December 2010, 13:00
Are you talking about events, or signals?
signals are emitted with emit, events is a bit more complicated issue, which usually you don't need.
Have a look at this:
http://doc.qt.nokia.com/latest/signalsandslots.html

nroberts
1st January 2011, 00:16
Hi,

I want to send pressed() event to an object of subclass of QPushButton. How can I do that. I see 'emit' keyword to emit signals, but I am not sure how to user that.
Can someone please explain me.

Thanks

I think what you might want is to call "click()" on the button, if what you're trying to do is "press" the button from another class or something.