From a5a8aa72950dc6a610170194e6685a3b834ed5ed 2010-05-29 18:07:36 From: florianlink Date: 2010-05-29 18:07:36 Subject: [PATCH] fixed example for 2.0 API git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@190 ea8d5007-eb21-0410-b261-ccb3ea6e24a9 --- diff --git a/examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.qrc b/examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.qrc index 0e28080..305aed1 100644 --- a/examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.qrc +++ b/examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.qrc @@ -1,4 +1,4 @@ - + example.py diff --git a/examples/PyCustomMetaTypeExample/example.py b/examples/PyCustomMetaTypeExample/example.py index 2daf821..e221db4 100644 --- a/examples/PyCustomMetaTypeExample/example.py +++ b/examples/PyCustomMetaTypeExample/example.py @@ -1,4 +1,4 @@ -from PythonQt import CustomObject +from PythonQt.example import CustomObject # create a new object custom = CustomObject("John","Doe") diff --git a/examples/PyCustomMetaTypeExample/main.cpp b/examples/PyCustomMetaTypeExample/main.cpp index 6f8af45..4a2ec3f 100644 --- a/examples/PyCustomMetaTypeExample/main.cpp +++ b/examples/PyCustomMetaTypeExample/main.cpp @@ -57,7 +57,7 @@ int main( int argc, char **argv ) // register the type with QMetaType qRegisterMetaType("CustomObject"); // add a wrapper object for the new variant type - PythonQt::self()->registerCPPClass("CustomObject","","", PythonQtCreateObject); + PythonQt::self()->registerCPPClass("CustomObject","","example", PythonQtCreateObject); mainContext.evalFile(":example.py");