I have a QTreeWidget where the user adds a list of networking items to be scanned. Once the "scan" button is clicked it loops though the list and reads the configuration from each device. This is all stored in objects of the Device class that I've created (one for each device).

To show the result, I've created a bunch of QTabWidgets that are stacked in a QStackedWidget. The problem I have is updating the widgets in the tabs once they are shown on screen. Right now I don't save the widgets anywhere (except on the stack) so I cannot access them later on. I can't figure out how to store the widgets in a nice way for easy access. Storing them in self won't work, multiple network devices will cause overwriting. Storing them in the Device objects caused a crash ("You can't create a QPaintedObject before a QApplication" or something like that).

The only thing I can think of is creating a list in self and store the widgets there, and then try to identify widgets in the list somehow to find the right one, but there's got to be an easier way...? Is it possible to access them on the stack?

Any thoughts on how to solve this is appreciated.