Trying to get my first PyQt MainWindow application going.<br>Its going to be to edit multiple [we'll just call them] documents in tabs.<br>I will have several dockwidgets that need to correspond to the currently selected tab.<br>
<br>So when the tab changes, or the data within the document changes, several dockwidgets need to be kept in sync.<br><br>Some questions.<br><br>1) How do I create static members for these dockwidgets on my subclass of QMainWindow?<br>
I'd like to do this so I don't have to pass around the actual reference to an instance of the subclass (just import MyMainWindow at the top and get it using MyMainWindow.dockWidgetX).<br>Right now I'm creating them during __init__ of my QMainWindow subclass and they actually take references to other instance objects but I can re-factor it to get those things later on.<br>
Is having static members an advisable thing to do? If not, please tell me a better way to do it. Passing around instances of the main window seems like its wrong to me, but again, I'm a newbie.<br>
<br>2) What is a good strategy for keeping the dock widgets in sync?<br><br>Thanks,<br>~Eric<br>