我可以连接两个不同类的对象吗?
假设我希望 button1 的 clicked() 信号清除 line2
class A(QGroupBox):
def __init__(self, parent=None):
super(A, self).__init__(parent)
self.button1= QPushButton('bt1')
self.button1.show()
class B(QGroupBox):
def __init__(self, parent=None):
super(B, self).__init__(parent)
self.line2 = QLineEdit()
self.line2.show()
ob1 = A()
ob2 = B()