2012/11/19 Koehne Kai <[email protected]> > > Hi, > > Even if you're not using QML, you might look into using it's debugging > infrastructure. All you'll probably have to do is create a dummy QQmlEngine > at the start of your app: Since breakpoints, stepping are global for v8, > you should be able to debug any JS code run by your app from within Qt > Creator. With a bit of work you could also implement an Eclipse backend: > The debugging protocol of QML just wraps the V8 JSON one. > > Drop me a mail if you need further links. > > Regards > > Kai >
2012/11/19 Kevin Krammer <[email protected]> > On Monday, 2012-11-19, Koehne Kai wrote: > Also, QML is not tied to UI at all. > > Cheers, > Kevin Hi, thanks for all advices. I have looked better into qml and found it solves all my problems (debuging, importing modules etc. ). Before i misunderstood qml concept. I thought all qml is deeply connected with QtQuick and gui. Maybe some example describing this usecase will not be bad idea. So, currently i have something like this (inspired by code from QQuickView): ...... qmlRegisterType<Test>("MyModule", 1, 0, "Test"); engine = new QQmlEngine(); component = new QQmlComponent(engine, QUrl::fromLocalFile("module.qml")); if (!component->isLoading()) { onComponentReady(); } else { connect(component, SIGNAL(statusChanged(QQmlComponent::Status)), this, SLOT(onComponentReady())); } } void QmlTest::onComponentReady() { disconnect(component, SIGNAL(statusChanged(QQmlComponent::Status)), this, SLOT(onComponentReady())); if (component->isError()) { QList<QQmlError> errorList = component->errors(); foreach (const QQmlError &error, errorList) { QMessageLogger(error.url().toString().toLatin1().constData(), error.line(), 0).warning() << error; } return; } Test *test = qobject_cast<Test *>( component->create() ); test->doSomeStuff(); Am i doing it right way? Regards Michal
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
