Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么办法可以得到 a 的名字QPushButton吗?
QPushButton
IE
self.pushButton_9_3.setObjectName("pushButton_9_3")
好吧,如果您有对按钮的引用,您可以简单地使用
my_button.objectName()
或者在你的情况下
self.pushButton_9_3.objectName()