PySide6-Code-Tutorial icon indicating copy to clipboard operation
PySide6-Code-Tutorial copied to clipboard

03-类的继承关系.py执行后,并没有打印出子类

Open wanniwa opened this issue 1 year ago • 1 comments

增加 from PySide6.QtWidgets import QPushButton, QRadioButton, QCheckBox, QToolButton这些之后 才会打印,感觉是根据import动态加载的

wanniwa avatar Aug 28 '24 03:08 wanniwa

我琢磨了一下,是惰性加载,因为QtWidgets里面有非常多的类,的确需要from PySide6.QtWidgets import 类名 才可以加载,然后__subclasses__才能检测得到。

FD-AU avatar Oct 14 '25 00:10 FD-AU