And I'm replying to myself to add that there are other possibilities too:
# using a callback def main(): ... if __name__=="__main__": QApplication().execute(main) # or QApplication.execute(main) for short # using a decorator @QMainFunction def main(): ... if __name__=="__main__": main() The decorator solution looks pretty satisfactory to me, but it requires either defining a new class like QMainFunction, or adding a static method decorator such as @QApplication.main. Cheers, Farsmo _______________________________________________ PySide mailing list PySide@lists.openbossa.org http://lists.openbossa.org/listinfo/pyside