[PyKDE] how to use sip?
Uwe Mayer
merkosh at hadiko.de
Mon Feb 16 19:36:01 GMT 2004
Hi,
sorry for this newbe question, but I just don't get sip running. I've read the
documentation and it doesn't say anything on how the structure of the
specification file.
I downloaded, compiled and installed the newes version of sip: 4.0 RC2, but
sip even returns an error when I feed it any of the current PyQt .sid
files...:
$ sip qtimer.sip
sip: qtimer.sip:32: class definition not allowed in a C module
All I wanted was to derive from QListViewItem and overwrite the key() method.
The C++ implementation is ready and compiles, just the Python binding is
missing.
Currently I got the files
qlistviewitemnumeric.cpp
qlistviewitemnumeric.sip
qlistviewitemnumeric.h
-- qlistviewitemnumeric.sip --
%Module QListViewItemNumeric
class QListViewItemNumeric :QListViewItem {
%TypeHeaderCode
#include <qlistview.h>
%End
public:
QListViewItemNumeric( QListView * );
virtual void setNumeric( int );
virtual QString key( int, bool ) const;
};
-- end --
and calling sip yields:
$ sip qlistviewitemnumeric.sip
sip: QListViewItem has not been defined
and does nothing.
Perhaps someone can give me some pointers.
Thanks in advance
Uwe
More information about the PyQt
mailing list