@@ -1,4 +1,4 | |||||
1 |
|
|
1 | <!DOCTYPE RCC><RCC version="1.0"> | |
2 | <qresource> |
|
2 | <qresource> | |
3 | <file>example.py</file> |
|
3 | <file>example.py</file> | |
4 | </qresource> |
|
4 | </qresource> |
@@ -1,4 +1,4 | |||||
1 | from PythonQt import CustomObject |
|
1 | from PythonQt.example import CustomObject | |
2 |
|
2 | |||
3 | # create a new object |
|
3 | # create a new object | |
4 | custom = CustomObject("John","Doe") |
|
4 | custom = CustomObject("John","Doe") |
@@ -57,7 +57,7 int main( int argc, char **argv ) | |||||
57 | // register the type with QMetaType |
|
57 | // register the type with QMetaType | |
58 | qRegisterMetaType<CustomObject>("CustomObject"); |
|
58 | qRegisterMetaType<CustomObject>("CustomObject"); | |
59 | // add a wrapper object for the new variant type |
|
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 | mainContext.evalFile(":example.py"); |
|
62 | mainContext.evalFile(":example.py"); | |
63 |
|
63 |
General Comments 0
You need to be logged in to leave comments.
Login now