Obtaining the Button Clicked after a Clicked() is emitted in Qt (C++) -
I was thinking, clicking once () is emitted by a button, there is no way to find out How does the button exit without overloading the click () function? (I have a bunch of buttons with almost the same function, but different text, which is the defined element of each button).
Thanks in advance!
sender () function to get QObject that send you
clicked () Given code
gives this a QObject *
. Use qobject_cast
to insert qobject *
to QPushButton *
. Documentation.
Comments
Post a Comment