[PyQt] Responsive thead in preview mode in Qt Designer

Lais P. Carmo lais.carmo at lnls.br
Thu Aug 11 20:01:12 BST 2016

Hi, David. Thank you so much for you response.

I took a look on the AnalogClock example. It is very simple and helped me understanding some useful concepts, but the custom label remains fronzen inside QtDesigner.

I cannot see errors related to the QThread usage on it (I will attach the plugin codes).

I have the C++ plugin code, it is the QELabel of EpicsQt Framework which is available here: https://sourceforge.net/projects/epicsqt/

I investigated it but could not understand how the variable associated with QELabel is received and updated. If someone wants to take a look on it, feel free. :)

Well, I will try to make the GUI designer tool in another way: once Qt Designer cannot execute the interface with my plugins, I will code this functionality.

I will get the .ui file as input to a code generator. The output is a .py to execute the application. I think it is possible because the .ui and the application code have a pattern (it can be seen in many Designer  tutorials) and no additional code will be needed after that. Suggestions about this are also welcome.

Now I have another question: besides the widgets plugins, is it possible to make customized plugins for Designer that add functionalities to it (e.g.: an option to generate an application and run it as I am going to do)?

There are many classes for plugins in QtDesigner module of PyQt5, but not sure if they can do it and how.

Thank you for the attention.


EPICS Qt Framework download | SourceForge.net<https://sourceforge.net/projects/epicsqt/>
EPICS Qt Framework download. EPICS Qt Framework 2016-07-31 03:40:26.214000 free download. EPICS Qt Framework Qt based GUI system for use on EPICS control ...


LaĆ­s Pessine do Carmo

Computer Engineering Trainee at Beamline Software Group

Brazilian Synchrotron Light Laboratory - LNLS
Center of Research in Energy and Materials - CNPEM
+ 55 (11) 94233-7721
http://lnls.cnpem.br                     lais.carmo at lnls.br

From: PyQt <pyqt-bounces at riverbankcomputing.com> on behalf of David Boddie <david at boddie.org.uk>
Sent: Saturday, August 6, 2016 8:40 AM
To: pyqt at riverbankcomputing.com
Subject: Re: [PyQt] Responsive thead in preview mode in Qt Designer

On Fri, 5 Aug 2016 18:19:08 +0000, Lais P. Carmo wrote:

> Now I need the custom label to be responsive when one enters the preview
> mode, in other words, with its text updating every second. However the
> updates doesn't occur, the text keeps fronzen, except when I move/resize
> the custom label in the edit mode (or anything that forces the Designer to
> update its entire GUI).
> Recently I used a Designer plugin that does exactly the same thing, but its
> written in C++. I need to have this effect in Python.

I don't remember if Designer informs the plugin that it wants the widgets to
be created for use in a preview, so there may not be a way of knowing that.

It may be that one of the PyQt examples can give you some ideas. The analog
clock plugin uses a timer, not a thread, but perhaps it can help you diagnose
what is going wrong.

If you have the source code for the C++ plugin, it may be possible to convert
it to Python. Ask if you need help with that.

PyQt mailing list    PyQt at riverbankcomputing.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160811/83d47ef7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyqelabel.py
Type: text/x-python
Size: 3289 bytes
Desc: pyqelabel.py
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160811/83d47ef7/attachment-0002.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyqelabel_plugin.py
Type: text/x-python
Size: 2558 bytes
Desc: pyqelabel_plugin.py
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160811/83d47ef7/attachment-0003.py>

More information about the PyQt mailing list