On 10/6/07, <b class="gmail_sendername">Phil Thompson</b> &lt;<a href="mailto:phil@riverbankcomputing.co.uk">phil@riverbankcomputing.co.uk</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Friday 05 October 2007, Arve Knudsen wrote:<br>&gt; Hi<br>&gt; I&#39;ve just written a Designer plugin in Python, which I have to say is very<br>&gt; nice. However I discovered some surprising behaviour in pyuic. My widget
<br>&gt; contains Qt properties (defined using pyqtProperty), but the generated code<br>&gt; don&#39;t use the properties, instead it tries to use the underlying methods!?<br>&gt; I discovered this for the reason that I use a different naming convention
<br>&gt; than pyuic apparently expected. For instance, I had a property &quot;value&quot;, for<br>&gt; which pyuic expected there to be a setter method &quot;setValue&quot;. I hope it<br>&gt; isn&#39;t on purpose that pyuic tries to use underlying methods instead of the
<br>&gt; properties themselves?<br>&gt;<br>&gt; I&#39;m using PyQt 4.3 commercial edition.<br>&gt;<br>&gt; Thanks,<br>&gt; Arve<br><br>If everything is working as it should then it depends on what you have called<br>the setter. If it begins with &quot;set&quot; then pyuic (and uic) should use it
<br>directly and not use setProperty(). However this has probably not had a lot<br>of testing.<br><br>What have you called your setter?</blockquote><div><br>Let&#39;s say the property is called &quot;value&quot;. I called my setter _set_value, pyuic inferred the setter&#39;s name to be setValue. 
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Does uic behave differently to pyuic?</blockquote><div><br>I haven&#39;t used uic for some time, but this point is kind of moot since C++ doesn&#39;t have properties while Python does :) The point is that I can&#39;t see that there is any reason for pyuic to try and use the setter method, when it can simply use the property (
i.e., obj.value = something).<br><br></div></div><br>Arve