[PyQt] Promote custom widget in Designer

Laís Pessine do Carmo lais.carmo at lnls.br
Mon Sep 4 12:21:48 BST 2017



'''

Laís Pessine do Carmo

Analyst of Technological Development at Beamline Software Group (SOL)

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


________________________________
From: Kyle Altendorf <sda at fstab.net>
Sent: Sunday, September 3, 2017 12:27 PM
To: Laís Pessine do Carmo
Cc: pyqt at riverbankcomputing.com
Subject: Re: [PyQt] Promote custom widget in Designer

On 2017-09-02 11:18, Laís Pessine do Carmo wrote:

> However, for some applications, I need to customize QLed a little bit
> by promoting it (because I would like NOT to create another plugin just
> for these minor changes).

My plugin files are really simple and I would personally rather just
copy/paste/tweak one than find some workaround that provides an
inconsistent interface in designer.

https://github.com/altendky/st/blob/lib/epyqlib/widgets/buttonplugin.py

Do note that I have put all the boilerplate for the plugins into a class
I can inherit from.

Hi, Kyle. Thank you for the reply! Nice, for now I am using an approach very similiar to yours, it is here: https://github.com/slaclab/pydm/blob/master/pydm/widgets/label_qtplugin.py

Could also be a decorator probably if you wanted to
avoid inheritance.

It is also a good suggestion, I will try this.

Cheers,
-kyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170904/cfd03975/attachment.html>


More information about the PyQt mailing list