[PyQt] about the sip wrappers

燕子 xiaoyan0325 at tom.com
Mon Aug 23 04:30:55 BST 2010


Dear sir.
 my head file is </:includetail>
 myqtlibtest.h:</:includetail>
 #ifndef MYQTLIBTEST_H
#define MYQTLIBTEST_H</:includetail>
 #include "myqtlibtest_global.h"
//#include <windows.h>
#include <qstring.h>
#include <qdebug.h>
#include "test.h"</:includetail>
 class MYQTLIBTEST_EXPORT myqtlibtest
{
public:
 myqtlibtest();
 ~myqtlibtest(); </:includetail>
  void show();
 int testshow();</:includetail>
 private:
 Test *testpointer;</:includetail>
 };
MYQTLIBTEST_EXPORT int myshow(int aa);</:includetail>
 #endif // MYQTLIBTEST_H</:includetail>
 my sip wrappers is</:includetail>
 myqtlibtest.sip:</:includetail>
 %Module myqtlibtest 0</:includetail>
 
%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
 class  myqtlibtest
{
 %TypeHeaderCode
 #include "myqtlibtest.h"
 %End
 public:
 myqtlibtest();
 ~myqtlibtest();
       void show();
       int testshow();
  private:
 Test *testpointer;
};
int myshow(int aa);
  
 when I run the command of "sip -I ..\sip\PyQt4\ -t Qt_4_5_3  -t WS_WIN myqtlibtest.sip
"
  
  the error is "sip:myqtlibtest.sip :23:Class variables must be in the public section." but I still need the private variable "Test *testpointer"
  
 what can I do?
  
 Susan,
 thank you.



</:includetail>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100823/4d11ac2a/attachment.html>


More information about the PyQt mailing list