On Thursday 30 January 2003 6:00 pm, Hans-Peter Jansen wrote:
> Hi Phil,
>
> attached is an implementation of QWidgetFactory based on the PyQt
> snapshot from 25.01. Since it's my first PyQt module, it would be
> nice, if you take a look over it, especially into the sip files.
> Any Transfer* magic missing? The win parts of quimod.sip are
> definitely wrong, but I don't know better, yet.
I've added this to PyQt with some minor changes - the main one being that the
new module is called qtui instead of qui to be consistent with the other
modules.
It wouldn't have been possible to get the Transfer magic correct because it
required SIP changes to get it right - specifically the addition of the
/Factory/ tag.
The SIP changes will be in tonight's snapshot. The PyQt changes won't appear
for a few days as I'm in the middle of breaking something.
For info I've attached the modified qwidgetfactory.sip file.
Thanks,
Phil
// This is the SIP interface definition for QWidgetFactory. Thanks to
// Hans-Peter Jansen for the original work.
//
// @BS_LICENSE@
%ExportedDoc
<Sect2><Title>QWidgetFactory (Qt v3+)</Title>
<Para>
<Literal>QWidgetFactory</Literal> is fully implemented.
</Para>
</Sect2>
%End
%If (Qt_3_0_0 -)
class QWidgetFactory
{
%HeaderCode
#include <qwidgetfactory.h>
%End
public:
QWidgetFactory();
static QWidget *create(const QString &,QObject * = 0,
QWidget * /TransferThis/ = 0,
const char * = 0) /Factory/;
static QWidget *create(QIODevice *,QObject * = 0,
QWidget * /TransferThis/ = 0,
const char * = 0) /Factory/;
static void addWidgetFactory(QWidgetFactory * /Transfer/);
static void loadImages(const QString &);
virtual QWidget *createWidget(const QString &,QWidget * /TransferThis/,
const char *) const /Factory/;
%If (Qt_3_1_0 -)
static QStringList widgets();
static bool supportsWidget(const QString &);
%End
};
%End