On Friday 14 January 2011 05:31:32 Fars- mo wrote:
> 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

I know, I am biased  :(
But
+1   :)

Al.
-- 
Algis
http://akabaila.pcug.org.au
_______________________________________________
PySide mailing list
PySide@lists.openbossa.org
http://lists.openbossa.org/listinfo/pyside

Reply via email to