[PySide] wait for QFileDialog to close

Sean Fisk sean at seanfisk.com
Tue Dec 10 21:35:24 CET 2013


Hi Janwillem,

Are you running the “lengthy part that processes a files list” within the
GUI thread? If so, you will probably see your GUI hang while this is
happening (you won’t be able to click or do anything). In this case, you
should consider running the processing in a different thread using
QThread<http://seanfisk.github.io/pyside-docs/pyside/PySide/QtCore/QThread.html>or
QThreadPool<http://seanfisk.github.io/pyside-docs/pyside/PySide/QtCore/QThreadPool.html>
.

Can you post the relevant part of the code?

Thanks,


--
Sean Fisk


On Tue, Dec 10, 2013 at 3:17 PM, Janwillem van Dijk <jwevandijk at xs4all.nl>wrote:

>  Hi, I have a PySide script that uses QFileDialog.getExistingDirectory().
> After clicking the Open button the script proceeds with a lengthy part that
> processes a files list and writes to a QPlainTextEdit. Unfortunately the
> QFileDialog widget does only disappear after this processing is finished,
> hiding the QPlainTextEdit.
>
> How can I make that the QFileDialog widget is gone before the processing
> starts?
>
> Cheers, Janwillem
>
>
>
>
> _______________________________________________
> 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/20131210/813628da/attachment.html>


More information about the PySide mailing list