<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;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>Two questions about pyqtProperties:</p>
<p><br>
</p>
<p><b>1)</b> When making plugins for QtDesigner, I expose <span>them</span> in the widget class escope with QtCore.pyqtProperty, passing as parameters the type of the property and functions to get and set, for example:</p>
<p><br>
</p>
<p><span><b>my_property = pyqtProperty('QString', getMyProperty, set<span>MyProperty</span>, None)</b></span><br>
</p>
<p><br>
</p>
<p>However, this time I would like to use types as <b>int</b> and <b>float</b>. Every time I try I got errors like this:</p>
<p><br>
</p>
<p><span><b>"TypeError: unable to convert a Python 'str' object to a C++ 'double' instance"</b></span></p>
<p><span><b><br>
</b></span></p>
<p><span>What is the correct way to define types different from QString?</span></p>
<p><span><br>
</span></p>
<p><span><b>2)</b> How can I create a property which is composed by others? An example of this kind is the property geometry of QWidget class: it is composed by X, Y, Width and Height properties.</span></p>
<p><span><br>
</span></p>
<p><span></span><br>
Thanks for any help! :)<br>
</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><span dir="ltr"><font color="#3366FF" size="2" face="Calibri,Arial,Helvetica,sans-serif"><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)">Computer Engineering
</span><span style="font-family:Consolas,monospace; font-size:12pt; color:rgb(117,123,128)">T</span><span style="font-family:Consolas,monospace; font-size:12pt; color:rgb(117,123,128)">rainee at Beamline Software Group</span></span></font><br>
</p>
<font color="#3366FF" size="2" face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif">
<div style="margin-top:0; margin-bottom:0"><font color="black" size="3" face="Calibri,Arial,Helvetica,sans-serif"><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>
+ 55 (11) 94233-772<font color="#006FC9"><font face="Calibri,Arial,Helvetica,sans-serif"></font></font>1 <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>
<font color="#3366FF" size="2" face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif"><font color="black" size="3" face="Calibri,Arial,Helvetica,sans-serif"><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"> <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>
<font color="#3366FF" size="2" face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif"><font color="black" size="3" face="Calibri,Arial,Helvetica,sans-serif"><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>
</div>
</body>
</html>