<div><span class="Apple-style-span" style="font-family: arial, sans-serif; ">Does pyqt provide a way to override the class name when deriving a QObject based class?</span></div><div><div><font class="Apple-style-span" face="arial, sans-serif"><br>
</font></div><div><font class="Apple-style-span" face="arial, sans-serif">An example of why this is wanted:</font></div><div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">def my_widget_class_factory(...):</font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"> class temp(QWidget):</font></div><div><font class="Apple-style-span" face="arial, sans-serif"> ...(dynamically generate class attributes and methods)</font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"> return temp</font></div><div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">All classes generated by the above function will come back with className() as "temp". This causes headaches for Designer.</font></div>
</div><div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">I know I can add a metaclass to mangle the class name, but I was wondering there was an easier way (ie, does QObject's metaclass provided a way to rename the class?)</font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">Thanks,</font></div><div><font class="Apple-style-span" face="arial, sans-serif">Dan.</font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div>