站长资源脚本专栏

PyQt5根据控件Id获取控件对象的方法

整理:jimmy2025/3/11浏览2
简介如下所示:self.findChild(QComboBox, "name") self is classfirst parameter is Typesecond parameter is Id String以上这篇PyQt5根据控件Id获取控件对象的方法就是小编分享给大家的全部内容了,希望能给大家

如下所示:

self.findChild(QComboBox, "name") 

self is class

first parameter is Type

second parameter is Id String

以上这篇PyQt5根据控件Id获取控件对象的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。