[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Promote custom widget in Designer
From:       Laís_Pessine_do_Carmo <lais.carmo () lnls ! br>
Date:       2017-09-04 11:21:48
Message-ID: CP2PR80MB0273463C9D7B16154A872C1992910 () CP2PR80MB0273 ! lamprd80 ! prod ! outlook ! com
[Download RAW message or body]

'''

La=EDs 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@lnls.br
'''


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

On 2017-09-02 11:18, La=EDs 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 ver=
y similiar to yours, it is here: https://github.com/slaclab/pydm/blob/maste=
r/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

[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} \
--></style> </head>
<body dir="ltr">
<div id="divtagdefaultwrapper" \
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" \
dir="ltr"> <p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div dir="ltr" id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); \
background-color: rgb(255, 255, 255); font-family: \
Calibri,Arial,Helvetica,sans-serif,&quot;EmojiFont&quot;,&quot;Apple Color \
Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Segoe UI \
Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols;"> <p><span dir="ltr"><font \
face="Calibri,Arial,Helvetica,sans-serif" color="#3366FF" size="2"><span \
style="font-size:10pt; background-color:white"></span></font></span><span \
style="color:rgb(117,123,128); font-family:Consolas,monospace">'''</span></p> \
<p><span style="color:rgb(117,123,128); \
font-family:Consolas,monospace"><b><u></u><span style="color:rgb(0,111,201)">Laís \
Pessine do Carmo</span></b><br> </span></p>
<p><span style="color:rgb(117,123,128); font-family:Consolas,monospace"></span><font \
color="#006FC9" size="2"><span style="font-size:11pt; color:rgb(0,0,0)"><span \
style="font-family:Consolas,monospace; font-size:12pt; color:rgb(117,123,128)"><font \
color="#006FC9" size="2"><span style="font-size:11pt; color:rgb(0,0,0)"><span \
style="font-family:Consolas,monospace; font-size:12pt; \
color:rgb(117,123,128)">Analyst</span></span></font>  of Technological Development at \
<b>Beamline Software Group <font color="#006FC9" size="2"> <span \
style="font-size:11pt; color:rgb(0,0,0)"><span style="font-family:Consolas,monospace; \
font-size:12pt; color:rgb(117,123,128)"><b>(SOL)</b></span></span></font></b></span></span></font></p>
 <font face="Calibri,Arial,Helvetica,sans-serif" color="#3366FF" size="2"><font \
face="Calibri,Arial,Helvetica,sans-serif"><font \
face="Calibri,Arial,Helvetica,sans-serif"> <div style="margin-top:0; \
margin-bottom:0"><font face="Calibri,Arial,Helvetica,sans-serif" color="black" \
size="3"><span style="font-size:12pt"><font color="#006FC9" size="2"><span \
style="font-size:11pt"><span style="color:rgb(0,0,0); \
font-family:Consolas,monospace"><span style="font-family:Consolas,monospace; \
font-size:12pt; color:rgb(117,123,128)"></span><b><span \
style="font-family:Consolas,monospace; font-size:12pt; \
color:rgb(0,111,201)">Brazilian  Synchrotron Light Laboratory - \
</span></b></span><b><span style="color:rgb(0,111,201); \
font-family:Consolas,monospace; font-size:12pt">L</span><span \
style="color:rgb(0,111,201); font-family:Consolas,monospace; \
font-size:12pt">NLS</span></b></span></font><b><font color="#006FC9" size="2"><span \
style="font-size:12pt; color:rgb(0,111,201); font-family:Consolas,monospace"><br> \
Center of Research in Energy and Materials - CNPEM</span></font></b><font \
color="#006FC9" size="2"><span style="font-size:12pt; color:rgb(117,123,128); \
font-family:Consolas,monospace"><br> &#43; 55 (11) 94233-772<font \
color="#006FC9"><font face="Calibri,Arial,Helvetica,sans-serif"></font></font>1 \
&nbsp;&nbsp;<font color="#006FC9" size="2"><span style="font-size:11pt; \
color:rgb(0,0,0)"><span style="font-family:Consolas,monospace; font-size:12pt; \
color:rgb(117,123,128)">/</span></span></font>&nbsp;&nbsp; <font \
face="Calibri,Arial,Helvetica,sans-serif" color="#3366FF" size="2"><font \
face="Calibri,Arial,Helvetica,sans-serif"><font \
face="Calibri,Arial,Helvetica,sans-serif"><font \
face="Calibri,Arial,Helvetica,sans-serif" color="black" size="3"><span \
style="font-size:12pt"><font color="#006FC9" size="2"><span style="font-size:12pt; \
color:rgb(117,123,128); font-family:Consolas,monospace">Ramal  \
1226</span></font></span></font></font></font></font></span></font><font \
color="#006FC9" size="2"><span style="font-size:11pt"><span \
style="color:rgb(117,123,128); font-family:Consolas,monospace; \
font-size:12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span \
style="background-color:rgb(255,255,255)"> </span></span></span></font><font \
color="#006FC9" size="2"><span style="font-size:11pt; color:rgb(0,0,0)"><br> <font \
color="#006FC9"><a id="LPNoLP" href="http://lnls.cnpem.br"><span \
style="font-size:14pt; background-color:rgb(255,255,255); \
color:rgb(0,111,201)"><b>http:/</b></span><b><font color="#006FC9"><span \
style="font-size:14pt; background-color:rgb(255,255,255); \
color:rgb(0,111,201)">/</span></font><span style="font-size:14pt; \
background-color:rgb(255,255,255); \
color:rgb(0,111,201)">lnls.cnpem.br</span></b></a></font><b><span \
style="background-color:rgb(255,255,255); \
color:rgb(0,111,201)"></span></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <font face="Calibri,Arial,Helvetica,sans-serif" color="#3366FF" size="2"><font \
face="Calibri,Arial,Helvetica,sans-serif"><font \
face="Calibri,Arial,Helvetica,sans-serif"><font \
face="Calibri,Arial,Helvetica,sans-serif" color="black" size="3"><span \
style="font-size:12pt"><font color="#006FC9" size="2"><span \
style="font-size:11pt"><span style="color:rgb(117,123,128); \
font-family:Consolas,monospace; font-size:12pt"><span \
style="background-color:rgb(255,255,255)"></span></span><b><span \
name="searchHitInReadingPane" id="0.768250062297091" class="highlight" \
style="color:rgb(0,111,201); font-family:Consolas,monospace; font-size:12pt; \
background-color:rgb(255,255,255)">lais.carmo</span><span \
name="searchHitInReadingPane" id="0.5587804111142429" class="highlight"></span><span \
style="color:rgb(117,123,128); font-family:Consolas,monospace; font-size:12pt"><span \
style="background-color:rgb(255,255,255); color:rgb(0,111,201)">@lnls.b</span><span \
style="color:rgb(0,111,201)">r</span></span></b></span></font><font color="#006FC9" \
size="2"><span style="font-size:11pt; \
color:rgb(0,0,0)"></span></font></span></font></font></font></font><br> <span \
style="font-family:Consolas,monospace; font-size:12pt; \
color:rgb(117,123,128)"></span></span></font></span></font></div> \
</font></font></font><span style="color:rgb(117,123,128); \
font-family:Consolas,monospace; font-size:12pt">'''</span><br> <p></p>
</div>
</div>
<br>
<br>
<div style="color: rgb(26, 26, 26);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, \
sans-serif" color="#000000"><b>From:</b> Kyle Altendorf &lt;sda@fstab.net&gt;<br> \
<b>Sent:</b> Sunday, September 3, 2017 12:27 PM<br> <b>To:</b> Laís Pessine do \
Carmo<br> <b>Cc:</b> pyqt@riverbankcomputing.com<br>
<b>Subject:</b> Re: [PyQt] Promote custom widget in Designer</font>
<div>&nbsp;</div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On 2017-09-02 11:18, Laís Pessine do Carmo wrote:<br>
<br>
&gt; However, for some applications, I need to customize QLed a little bit <br>
&gt; by promoting it (because I would like NOT to create another plugin just <br>
&gt; for these minor changes).<br>
<br>
My plugin files are really simple and I would personally rather just <br>
copy/paste/tweak one than find some workaround that provides an <br>
inconsistent interface in designer.<br>
<br>
<a href="https://github.com/altendky/st/blob/lib/epyqlib/widgets/buttonplugin.py">https://github.com/altendky/st/blob/lib/epyqlib/widgets/buttonplugin.py</a><br>
 <br>
Do note that I have put all the boilerplate for the plugins into a class <br>
I can inherit from.&nbsp; <br>
<br>
<span style="color: rgb(114, 50, 173);">Hi, Kyle. Thank you for the reply! Nice, for \
now I am using an approach very similiar to yours, it </span><span style="color: \
rgb(114, 50, 173);">is here</span><span style="color: rgb(114, 50, 173);">:</span> <a \
previewremoved="true" id="LPlnk132349" \
href="https://github.com/slaclab/pydm/blob/master/pydm/widgets/label_qtplugin.py" \
class="OWAAutoLink"> \
https://github.com/slaclab/pydm/blob/master/pydm/widgets/label_qtplugin.py</a><br> \
<br> Could also be a decorator probably if you wanted to <br>
avoid inheritance.<br>
<br>
<span style="color: rgb(114, 50, 173);">It is also a good suggestion</span><span \
style="color: rgb(114, 50, 173);">, I will try this.</span><br> <br>
Cheers,<br>
-kyle<br>
</div>
</span></font></div>
</div>
</body>
</html>


[Attachment #4 (unknown)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic