<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div><br></div><div><span style="font-size: 12pt;">Versions:</span><span style="font-size: 12pt;"> </span></div><div>Redhat Linux EL6</div><div>Qt 4.7.1 (also tested with 4.8.2)</div><div>PyQt: 4.10</div><div>Python: 2.7.4</div><div>Sip: 4.14</div><div><br></div>Sip 4.14, and 4.13 as well gives me the following error when trying to generate code on the following sip file:<div>sip -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_7_1 -g -I /usr/pic1/root/share/sip/PyQt4 -c . python/TestQVariant.sip</div><div>sip: python/TestQVariant.sip:6: A class, exception, namespace or mapped type has already been defined with the same name</div><div><br></div><div>// TestQVariant.sip:</div><div><div>%Module TestQVariant</div><div><br></div><div>%Import QtCore/QtCoremod.sip</div><div><br></div><div>class TestQVariant : public QVariant</div><div>{</div><div>%TypeHeaderCode</div><div>include "TestQVariant.h"</div><div>$End</div><div>public:</div><div> TestQVariant(void);</div><div><br></div><div> TestQVariant(const QVariant &v);</div><div> </div><div> TestQVariant(int v);</div><div> </div><div> TestQVariant(double v);</div><div> </div><div> TestQVariant(const QString &v);</div><div><br></div><div> TestQVariant(const TestQVariant &a);</div><div><br></div><div> bool hasName(void) const;</div><div> </div><div> const QString &name(void) const; </div><div> </div><div> void setName(const QString &name);</div><div><br></div><div>};</div><div>%End</div></div><div><br></div><div>// TestQVariant.h</div><div><div>#ifndef TestQVariant_h</div><div>#define TestQVariant_h</div><div><br></div><div>#include <QtCore/QVariant></div><div>#include <QtCore/QString></div><div><br></div><div>class TestQVariant : public QVariant</div><div>{</div><div>public:</div><div> TestQVariant(void)</div><div> {</div><div> }</div><div><br></div><div> TestQVariant(const QVariant &v) :</div><div> QVariant(v)</div><div> {</div><div> }</div><div> </div><div> TestQVariant(int v) :</div><div> QVariant(v)</div><div> {</div><div> }</div><div> </div><div> TestQVariant(double v) :</div><div> QVariant(v)</div><div> {</div><div> }</div><div> </div><div> TestQVariant(const QString &v) :</div><div> QVariant(v)</div><div> {</div><div> }</div><div><br></div><div> TestQVariant(const TestQVariant &a) :</div><div> QVariant(a),</div><div> mName(a.mName)</div><div> {</div><div> }</div><div><br></div><div> TestQVariant &operator=(const TestQVariant &a)</div><div> {</div><div> QVariant::operator=(a);</div><div> mName = a.mName;</div><div> return *this;</div><div> }</div><div> </div><div> bool hasName(void) const</div><div> {</div><div> return !mName.isEmpty();</div><div> }</div><div> </div><div> const QString &name(void) const</div><div> {</div><div> return mName;</div><div> }</div><div> </div><div> void setName(const QString &name)</div><div> {</div><div> mName = name;</div><div> }</div><div> </div><div>private:</div><div> QString mName;</div><div>};</div><div><br></div><div>#endif</div></div><div><br></div><div><br></div><div>Is this related to the API version that QVariant is using? This is with Python 2.7, so it should default to '2'. Is there some other name I need to use for the QVariant class to get this to work? </div><div>-Nate</div> </div></body>
</html>