[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] INHERITING CLASS
From: Amey Patil <amey.patil () sjsu ! edu>
Date: 2014-07-25 15:48:26
Message-ID: CADJ8CoNZoc8HVeR05VLNnYVDKyZJNhJzc4o+m3rc0Oju=Scbrg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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
[Attachment #5 (text/html)]
<div dir="ltr"><div><div><div><div>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.<br><br></div><b>word.h</b><br><br><span \
style="color:rgb(255,0,0)">class Word{<br> <br>public:<br> int integer;<br> \
void set_int(int a);<br> int \
get_int();<br><br>};</span><br><br></div><b>word.sip</b><br><br><span \
style="color:rgb(255,0,0)">%Module word <br><br>class \
Word<br>{<br><br>%TypeHeaderCode<br> #include \
<word.h><br>%End<br><br>public:<br> int integer;<br> void \
set_int(int a);<br> int get_int();<br>};</span><br><br></div>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.<br> <br></div><b>word.h \
(edited)</b><br><div><div><div><div><div><span \
style="color:rgb(255,0,0)"><br>#include "parent.h"<br><br>class Word : \
public Parent{<br><br>public:<br> int integer;<br> void set_int(int \
a);<br> int get_int();<br> \
<br>};</span><br><br></div><div><b>parent.h</b><br><span \
style="color:rgb(255,0,0)"><br>class Parent<br>{<br><br>public:<br> int \
increment_int(int b);<br><br>};</span><br><br></div><div>Now how should I make sip \
understand this? should I make parent.sip too? If yes then how to add it in the \
wrapper??<br> <br></div><div>Looking forward for your \
reply..<br><br></div><div>Sincere Regards,<br></div><div>Amey \
Patil<br></div></div></div></div></div></div>
[Attachment #6 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic