##// END OF EJS Templates
fixed example for 2.0 API...
florianlink -
r151:a5a8aa72950d
parent child
Show More
@@ -1,4 +1,4
1 <!DOCTYPE RCC><RCC version="1.0">
1 <!DOCTYPE RCC><RCC version="1.0">
2 2 <qresource>
3 3 <file>example.py</file>
4 4 </qresource>
@@ -1,4 +1,4
1 from PythonQt import CustomObject
1 from PythonQt.example import CustomObject
2 2
3 3 # create a new object
4 4 custom = CustomObject("John","Doe")
@@ -57,7 +57,7 int main( int argc, char **argv )
57 57 // register the type with QMetaType
58 58 qRegisterMetaType<CustomObject>("CustomObject");
59 59 // add a wrapper object for the new variant type
60 PythonQt::self()->registerCPPClass("CustomObject","","", PythonQtCreateObject<CustomObjectWrapper>);
60 PythonQt::self()->registerCPPClass("CustomObject","","example", PythonQtCreateObject<CustomObjectWrapper>);
61 61
62 62 mainContext.evalFile(":example.py");
63 63
General Comments 0
You need to be logged in to leave comments. Login now