<div class="gmail_quote"><div><div class="h5"><div class="gmail_quote">2011/8/15 Phil Thompson <span dir="ltr"><<a href="mailto:phil@riverbankcomputing.com" target="_blank">phil@riverbankcomputing.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, 15 Aug 2011 11:28:04 +0200, Marcus Lindblom Sonestedt<br>
<<a href="mailto:marcus.s.lindblom@gmail.com" target="_blank">marcus.s.lindblom@gmail.com</a>> wrote:<br>
> Henning Schröder skrev 2011-08-10 20:55:<br>
>> Hello,<br>
>> please see <a href="http://www.henning-schroeder.de/embeddedpyqt/" target="_blank">http://www.henning-schroeder.de/embeddedpyqt/</a> if you are<br>
>> interested in this topic.<br>
>> The idea was to create easy access between Python and C++ and<br>
>> providing a simple api to the end user.<br>
>> Feedback welcome.<br>
>> Regards<br>
>> Henning<br>
><br>
> Neat! I'll definitely have a look at this someday in the future (as we<br>
> do mix C++ and Python quite heavily in our apps.)<br>
><br>
> I especially like that you've mapped Qt properties to Python using upper<br>
<br>
> case on the first letter<br>
><br>
(<a href="http://www.henning-schroeder.de/embeddedpyqt/using.html#differences-to-sip" target="_blank">http://www.henning-schroeder.de/embeddedpyqt/using.html#differences-to-sip</a>).<br>
><br>
> That would be awesome to have in PyQt. It doesn't seem _that_ hard to<br>
> get in there, if Phil is willing of course. ;)<br>
<br>
It is hard...<br>
<br>
In C++ the property names are in a different namespace to the class<br>
methods so their names can clash, for example QObject's objectName property<br>
and objectName() method. In Python they are in the same namespace (the<br>
class dict) and so cannot co-exist.<br>
<font color="#888888"><br>
Phil<br></font></blockquote><div> </div></div></div></div><div>I wrote that mapping the property names to having the first letter in _uppercase_, they would not clash with the functions.</div><div>This works for Qt at least, which is consistent in this case, and would allow co-existance.</div>
<div>(If it works for Henning...)</div><div><br></div><div>Though, I agree it's a bit hackish, but IMHO, it would be worth it to bring Qt properties into Python.</div><div><br></div><div>Cheers</div><div>/Marcus</div>
<font color="#888888">
<div><br></div><div><br></div><div><br></div>
</font></div><br>