if FULLSCREEN: pksampler = MainWindow(None, 'PKSampler', Qt.WStyle_Customize | Qt.WStyle_NoBorder) pksampler.move(0,0) else: pksampler = MainWindow() # motivated by the exceptions thrown in SampleControl.__del__ import atexit def _atexit(): pksampler.unloadAllSamples() atexit.register(_atexit) _splash(splash, "Caching samples...") pksampler.fillWidgetCache() _splash(splash, "Bringing up main window...") app.setMainWidget(pksampler) if splash: splash.finish(pksampler) del splash if FULLSCREEN: initScreenRes() # Do the rest in a try block so we can still reset the screen res. try: pksampler.show() app.exec_loop()