sala
sala

Reputation: 181

Get name of QPushButton

Is there any way to get the name of a QPushButton?

i.e.

self.pushButton_9_3.setObjectName("pushButton_9_3")

Upvotes: 1

Views: 7757

Answers (1)

Vicent
Vicent

Reputation: 5452

Well, if you have a reference to the button you can simply use

my_button.objectName()

or in your case

self.pushButton_9_3.objectName()

Upvotes: 7

Related Questions