Python and Qt4 Designer

Michael Torrie torriem at gmail.com
Mon Jul 16 15:56:19 CEST 2012


On 07/15/2012 01:58 AM, Vincent Vande Vyvre wrote:
> Rusi is not the op, and his question is about these lines
> 
>     app = None
>     if ( not app ):

Yeah that's a no-op.  The original author of that code is clearly
confused there.

> 
> not this one
> 
>         app = QtGui.QApplication([])
> 
> which should be written like this
> 
>         app = QtGui.QApplication(sys.argv)

Yeah.  The QApplication not only is the main engine, but it also parses
the command-line for certain flags that influence Qt's behavior, similar
to gtk's main function that also parses command-line flags (specific to
gtk's operation).



More information about the Python-list mailing list