class MyTableWidget(QWidget):
def __init__(self, parent=None):
super(QWidget, self).__init__(parent)
def addRefreshAcc(self):
print("Refresh")
asd = 5
class AddAcc(QWidget):
def __init__(self):
super(AddAcc, self).__init__()
def sendAcc(self):
widget = MyTableWidget()
widget.addRefreshAcc()
pass
class Window(QMainWindow):
def __init__(self):
super(Window, self).__init__()
self.table_widget = MyTableWidget(self)
if __name__ == "__main__":
app = QApplication(sys.argv)
GUI = Window()
sys.exit(app.exec_())
widget = MyTableWidget()
...
def sendAcc(self, widget):
widget.addRefreshAcc()
pass