[PyQt] INHERITING CLASS
Amey Patil
amey.patil at sjsu.edu
Fri Jul 25 16:48:26 BST 2014
This is my class for which i create .sip file and make a sip wrapper.
Following are my word.h an word.sip files respectively.
*word.h*
class Word{
public:
int integer;
void set_int(int a);
int get_int();
};
*word.sip*
%Module word
class Word
{
%TypeHeaderCode
#include <word.h>
%End
public:
int integer;
void set_int(int a);
int get_int();
};
Now if I want to inherit word class from some parent class, I edited the
word.h file as shown below, also showing the parent class for better
understanding.
*word.h (edited)*
#include "parent.h"
class Word : public Parent{
public:
int integer;
void set_int(int a);
int get_int();
};
*parent.h*
class Parent
{
public:
int increment_int(int b);
};
Now how should I make sip understand this? should I make parent.sip too? If
yes then how to add it in the wrapper??
Looking forward for your reply..
Sincere Regards,
Amey Patil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140725/f5dc363b/attachment.html>
More information about the PyQt
mailing list