Get name of QPushButton

后端 未结 1 1159
南笙
南笙 2020-12-12 05:17

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

i.e.

self.pushButton_9_3.setObjectName(\"pushButton_9_3\")
相关标签:
1条回答
  • 2020-12-12 06:09

    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()
    
    0 讨论(0)
提交回复
热议问题