1

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

i.e.

self.pushButton_9_3.setObjectName("pushButton_9_3")
Tim
  • 11,710
  • 4
  • 42
  • 43
sala
  • 181
  • 1
  • 12

1 Answers1

7

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()
Vicent
  • 5,322
  • 2
  • 28
  • 36
  • its not working in my program can you please tell me is there any method to get the name of the pushbutton – navya sri Dec 18 '18 at 07:59