[PyQt] Show QDialog and execute code after

Barry barry at barrys-emacs.org
Sun Apr 15 08:55:14 BST 2018



> On 14 Apr 2018, at 20:46, Ricardo Araoz <ricaraoz at gmail.com> wrote:
> 
>> On 14/04/18 15:46, Kyle Altendorf wrote:
>> On April 14, 2018 2:01:36 PM EDT, Maurizio Berti <maurizio.berti at gmail.com> wrote:
>>>> I making an update app that shows a QTextEdit object and starts
>>> (should)
>>> start to get information from the system before
>>>> ask the user what to do, it does that but if now but only after the
>>> function get all the system info and the it draws the QDialog.
>>>> It's something like a Debian apt-get where the terminal is showing
>>> what
>>> is appending before and after each operation.
>>> 
>>> If that's the case, you should use a separate QObject that collects the
>>> output of apt-get and emits a signal every time it has something to
>>> show.
>>> That QObject has to be moved to a new QThread, so that the apt-get
>>> process
>>> will not block the GUI interaction and painting.

Is there any advantage to using QThread over python threads?

Barry


>> 
>> Cheers,
>> -kyle
>> 
> 
> Agree, the easiest technique that produces the desired result.
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list