Hi all,<br>
<br>
I changed the wrapping approach to the wrapper&lt;...&gt;, and with some ajustments it worked. <br>
<br>
I will display the code (just the essential part) below:<br>
<br>
<font size="1"><span style="font-family: courier new,monospace;">struct QObject_Wrapper: QObject, wrapper&lt;QObject&gt;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">{<br>
&nbsp;&nbsp;&nbsp; // notice that I have overloaded constructors<br>
&nbsp;&nbsp;&nbsp; // so I have to redefine them<br style="font-family: courier new,monospace;">
</span><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; QObject_Wrapper(): </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QObject()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; QObject_Wrapper(QObject* parent):</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QObject(parent)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; bool</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; event(QEvent* p0)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (override event = this-&gt;get_override(&quot;event&quot;))</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // here is the trick. &quot;event&quot; is a Python object<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // not a real C++ funcion<br style="font-family: courier new,monospace;">
</span><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return event( ptr( p0 ) );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return QObject::event(p0);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; bool</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; default_event(QEvent* p0)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this-&gt;QObject::event(p0);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">};</span></font> &nbsp;  <br>
<br>
<font style="font-family: courier new,monospace;" size="1">void<br>
export_QObject()<br>
{&nbsp;  <br>
&nbsp;&nbsp;&nbsp; class_&lt;QObject_Wrapper,<br>
&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; boost::shared_ptr&lt;QObject_Wrapper&gt;,<br>
 &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boost::noncopyable&gt;<br>
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (&quot;QObject&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // constructor with no parent<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .def(init&lt;&gt;())<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // constructor with QObject parent<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .def(init&lt;QObject*&gt;( args(&quot;parent&quot;) )<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [with_custodian_and_ward&lt;1,2&gt;()] )<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .def(&quot;event&quot;, &amp;QObject::event, &amp;QObject_Wrapper::default_event)<br>
&nbsp;&nbsp;&nbsp; ;<br>
}</font><br>
<br>
So, it solved the problem. The only thing that I am concerned about, is
how does it know to convert native &quot;QObject&quot; to the &quot;QObject_Wrapper&quot;.
Well its working well anyway. BTW, Pyste must be updated for that
wrapper&lt;...&gt; use.<br>
<br>
Thanks everybody. I am enjoying Boost.Python more everyday :)<br>
<br>
[Eric Jardim]<br>