why is there no reference between the app and the widget?
问题 This is a follow up to why will the application show after sys.exit command? I'm following this tutorial: http://zetcode.com/tutorials/pyqt4/firstprograms/ I modified the code slightly to test things import sys from PyQt4 import QtGui if __name__ == "__main__": app = QtGui.QApplication(sys.argv) w = QtGui.QWidget() w.resize(250,150) w.move(300,300) w.setWindowTitle("Title") w.show() sys.exit(app.exec_()) I'm confused as to why there isn't a reference of app and w i'd expect some kind of