[PySide] initialize and delete QApplication instances many times

Zfox Atis zfoxatis at gmail.com
Wed Oct 24 15:17:21 CEST 2012


try app -> raise ->  except ?

2012/10/24 flyer <flyer103 at gmail.com>

> Is it possible to initialize and delete QApplication instances many times?
>
> The following is a sample code:
> *try:*
>
>> while some_condition:
>
>     app = QApplication(sys.argv)
>
>            some_actions
           *raise...*

> *except:*
>>
> *'''ending prog'''*
>>
>     del app ....*not need, automatic del app* (or app=None)
>>
>

>
>
> I tried, but it seemed impossible.
>
> If I want to initialize and delete QApplication instances many times in a
> single file, how can I do that?
>
> --
> 宠辱不惊,闲看庭前花开花落;去留无意,漫随天边云卷云舒。
>
>
>
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20121024/db2b6d2e/attachment.html>


More information about the PySide mailing list