Mar-02-2017, 04:04 PM
Hi there,
I am building a GUI application that has multiple windows and I am having difficulty passing data between them all cleanly. Each window is in it's own class in it's own module, and I have a helper module to do things like create database connection, save to database that sort of thing. But the biggest problem I am finding is that if I instantiate another widget in the main window, e.g.
How do you get around this issue?
I would post my code, but there is hundreds of lines
I am building a GUI application that has multiple windows and I am having difficulty passing data between them all cleanly. Each window is in it's own class in it's own module, and I have a helper module to do things like create database connection, save to database that sort of thing. But the biggest problem I am finding is that if I instantiate another widget in the main window, e.g.
self.input = NewWidget() self.input.show()In order to use the helper functions with this, I end up using the local variable to make it work:
myVariable = self.input.ui_line_edit.text()Making it seem rather useless to have as a seperate function as it still will have to be re written to be used else where.
How do you get around this issue?
I would post my code, but there is hundreds of lines