<DIV><BR>I'm on Windows using Microsoft Visual Stdio2008, &nbsp;Python 3.1,&nbsp; PyQt-win-gpl-4.6.2,&nbsp; sip-4.9.2&nbsp; and Qt 4.5.3.<BR>First,I have <FONT face=Calibri>myqtlibtest</FONT>.h; <FONT face=Calibri>myqtlibtest</FONT>.lib;<FONT face=Calibri>myqtlibtest</FONT>.dll from the <FONT face=Calibri>myqtlibtest project.It's&nbsp; simple.Just like this:</FONT></DIV>
<DIV><FONT face=Calibri></FONT>&nbsp;</DIV>
<DIV><FONT face=Calibri>myqtlibtest</FONT><FONT face=Verdana>.h:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#008000>#ifndef MYQTLIBTEST_H<BR>#define MYQTLIBTEST_H</FONT></DIV>
<DIV><FONT color=#008000>#include "myqtlibtest_global.h"</FONT></DIV>
<DIV><FONT color=#008000>#include &lt;qstring.h&gt;<BR>#include &lt;qdebug.h&gt;</FONT></DIV>
<DIV><FONT color=#008000>class MYQTLIBTEST_EXPORT myqtlibtest<BR>{<BR>public:<BR>&nbsp;myqtlibtest();<BR>&nbsp;~myqtlibtest();<BR>&nbsp;void show(){<BR>&nbsp;&nbsp;qDebug()&lt;&lt;QString("hello");<BR>&nbsp;}</FONT></DIV>
<DIV><FONT color=#008000>private:</FONT></DIV>
<DIV><FONT color=#008000>};</FONT></DIV>
<DIV><FONT color=#008000>#endif // MYQTLIBTEST_H</FONT><BR>&nbsp;</DIV>
<DIV><BR>when&nbsp;I wrap with SIP. Then&nbsp;my &nbsp;sip file&nbsp;is&nbsp;like this:</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Calibri>myqtlibtest</FONT><FONT face=Verdana>.sip:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#008000>%</FONT><FONT color=#008080>Module myqtlibtest 0</FONT></DIV>
<DIV><FONT color=#008080>%Import C:/Python31/Lib/site-packages/PyQt4/sip/PyQt4/QtCore/QtCoremod.sip</FONT></DIV>
<DIV><FONT color=#008080></FONT>&nbsp;</DIV>
<DIV><FONT color=#008080>%If (Qt_4_5_3 -)</FONT></DIV>
<DIV><BR><FONT color=#008080>class&nbsp; myqtlibtest<BR>{</FONT></DIV>
<DIV><FONT color=#008080>%TypeHeaderCode</FONT></DIV>
<DIV><FONT color=#008080>#include "myqtlibtest.h"</FONT></DIV>
<DIV><FONT color=#008080>%End</FONT></DIV>
<DIV><FONT color=#008080>public:<BR>&nbsp;myqtlibtest();<BR>&nbsp;~myqtlibtest();<BR>&nbsp;void show();<BR>private:</FONT></DIV>
<DIV><FONT color=#008080>};<BR>%End</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>I'd like to add Qt classes to my python program.<BR><BR>I've gotten the file of myqtlibtest.pyd by my sip file, but when I run my myqtlibtest.pyd ,I got nothing just like this:</DIV>
<DIV>when I run it on python idle.(<FONT face=Calibri>myqtlibtest is my module</FONT>)</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><FONT face=Calibri>&gt;&gt;&gt; import myqtlibtest</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><FONT face=Calibri>&gt;&gt;&gt; help(myqtlibtest)</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><FONT face=Calibri>Help on module myqtlibtest:</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><?XML:NAMESPACE PREFIX = O /><O:P></O:P><FONT face=Calibri>&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><FONT face=Calibri>NAME</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><FONT face=Calibri><SPAN style="mso-spacerun: yes">&nbsp; &nbsp; </SPAN>myqtlibtest</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><O:P></O:P><FONT face=Calibri>&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><FONT face=Calibri>FILE</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><FONT face=Calibri><SPAN style="mso-spacerun: yes">&nbsp; &nbsp; </SPAN>c:\python31\dlls\myqtlibtest.pyd</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><O:P></O:P><FONT face=Calibri>&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><O:P></O:P><FONT face=Calibri>&nbsp;&gt;&gt;&gt; myqtlibtest.myqtlibtest()<BR><FONT color=#ff6600>Traceback (most recent call last):<BR>&nbsp; File "&lt;pyshell#11&gt;", line 1, in &lt;module&gt;<BR>&nbsp;&nbsp;&nbsp; myqtlibtest.myqtlibtest()<BR>AttributeError: 'module' object has no attribute 'myqtlibtest'<BR></FONT>&gt;&gt;&gt; a=myqtlibtest.myqtlibtest()<BR><FONT color=#ff6600>Traceback (most recent call last):<BR>&nbsp; File "&lt;pyshell#12&gt;", line 1, in &lt;module&gt;<BR>&nbsp;&nbsp;&nbsp; a=myqtlibtest.myqtlibtest()<BR>AttributeError: 'module' object has no attribute 'myqtlibtest'<BR></FONT>&gt;&gt;&gt; </FONT></SPAN><BR><BR>Where is the wrapping class?<BR>Any help? Thanks - susan</P></DIV>