PyQt Confusion with Inheritance
<p>I try to organize my code and therefore put some stuff into modules.
I would like several variables,, such as a <code>statusBar()</code>, in the main code section to be altered by imported modules.
I made a quick minimal working example to show what I mean:</p>

<p>Here is my main.py:</p>

<pre><code>from PyQt4 import QtGui
import module
import sys

class ApplicationWindow(QtGui.QMainWindow):
    def __init__(self, parent = None):
        QtGui.QMainWindow.__init__(self, parent)
        self.statusBar().showMessage("Main window initalized")
        module.Test()

def main():
    app = QtGui.QApplication(sys.argv)
    form = ApplicationWindow()
    form.show()
    app.exec_()

if __name__ == "__main__":
    main()  
</code></pre>

<p>Here is module.py:</p>

<pre><code>from PyQt4 import QtGui
class Test(QtGui.QMainWindow):
    def __init__(self):
        super(Test, self).__init__()
        print 'hello'
        self.statusBar().showMessage("Test module called", 6000)
</code></pre>

<p>The code prints <code>"hello"</code> and does not throw me any error, so I assume the module is successfully imported and Test is initialized, but it does not alter the <code>statusBar()</code> in my ApplicationWindow somehow. How can I achieve that? It's probably a silly mistake, so sorry in advance for bothering you!</p>