Hi I want insert code in qml.
i have file main.qml, i try append this code import Qt 4.7\n Rectangle { width : 1000; height:1000; color: \"blue\" } ex: QApplication app(argc, argv); QDeclarativeView view; QDeclarativeContext *context = new QDeclarativeContext(view.rootContext()); QDeclarativeComponent component(view.engine()); component.setData("import Qt 4.7\n Rectangle { width : 1000; height:1000; color: \"blue\" }", QUrl("main.qml")); component.create(context); view.setSource(QUrl("main.qml")); view.show(); return app.exec(); But this code don't run. -- marvin42 _______________________________________________ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml