This is a stupid question and I've avoided id for a time but... where is the main loop? This is how I start my application:
if __name__ == '__main__':
try:
mainWindow = MainWindow()
myApp.exec_()
....
def __init__(self):
self.setWindowTitle("Test Application")
self.setGeometry(0, 0, 1000, 900)
self.CreateStatusBar()
self.show()
....
if __name__ == '__main__':
try:
myApp = QtGui.QApplication(sys.argv)
mainWindow = MainWindow()
myApp.exec_()
....
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
self.setWindowTitle("Test Application")
self.setGeometry(0, 0, 1000, 900)
self.CreateStatusBar()
self.show()
....
To copy to clipboard, switch view to plain text mode
So if I want to put code in the main loop, where do I put it?
Bookmarks