|
@@
-59,7
+59,7
int main( int argc, char **argv )
|
|
59
|
// -----------------------------------------------------------------
|
|
59
|
// -----------------------------------------------------------------
|
|
60
|
|
|
60
|
|
|
61
|
// register the new object as a known classname and add it's wrapper object
|
|
61
|
// register the new object as a known classname and add it's wrapper object
|
|
62
|
PythonQt::self()->registerCPPClass("CustomObject", "","", PythonQtCreateObject<CustomObjectWrapper>);
|
|
62
|
PythonQt::self()->registerCPPClass("CustomObject", "","example", PythonQtCreateObject<CustomObjectWrapper>);
|
|
63
|
|
|
63
|
|
|
64
|
// -----------------------------------------------------------------
|
|
64
|
// -----------------------------------------------------------------
|
|
65
|
// Alternative 2: make CustomObject2 known and use a wrapper factory for wrapping:
|
|
65
|
// Alternative 2: make CustomObject2 known and use a wrapper factory for wrapping:
|
|
@@
-70,7
+70,7
int main( int argc, char **argv )
|
|
70
|
|
|
70
|
|
|
71
|
// the following is optional and only needed if you want a constructor:
|
|
71
|
// the following is optional and only needed if you want a constructor:
|
|
72
|
// register the new object as a known classname
|
|
72
|
// register the new object as a known classname
|
|
73
|
PythonQt::self()->registerCPPClass("CustomObject2");
|
|
73
|
PythonQt::self()->registerCPPClass("CustomObject2", "", "example");
|
|
74
|
// add a constructor for CustomObject2
|
|
74
|
// add a constructor for CustomObject2
|
|
75
|
PythonQt::self()->addClassDecorators(new CustomObject2Constructor());
|
|
75
|
PythonQt::self()->addClassDecorators(new CustomObject2Constructor());
|
|
76
|
|
|
76
|
|