diff options
Diffstat (limited to 'examples/declarative/cppextensions/referenceexamples/adding/main.cpp')
-rw-r--r-- | examples/declarative/cppextensions/referenceexamples/adding/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp index f429b6e..19cf034 100644 --- a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp @@ -51,13 +51,13 @@ int main(int argc, char ** argv) //![0] QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, ":example.qml"); + QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); Person *person = qobject_cast<Person *>(component.create()); if (person) { qWarning() << "The person's name is" << person->name(); qWarning() << "They wear a" << person->shoeSize() << "sized shoe"; } else { - qWarning() << "An error occured"; + qWarning() << component.errors(); } return 0; |