Hello;
I'm trying to build a plugin for Qt Creator as described in [1] http://doc.qt.digia.com/qtcreator-ex...st-plugin.html.
The plugin should use Qt Quick QML.
I wonder how to insert this code from the main() function of a destktop Qt Quick app:
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine("main.qml");
QObject *root
= engine.
rootObjects().
at(0);
QQuickWindow *window =
qobject_cast<QQuickWindow*>(root);
if (!window) {
qFatal("Error: No window found!");
}
window->show();
return app.exec();
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine("main.qml");
QObject *root = engine.rootObjects().at(0);
QQuickWindow *window =
qobject_cast<QQuickWindow*>(root);
if (!window) {
qFatal("Error: No window found!");
}
window->show();
return app.exec();
To copy to clipboard, switch view to plain text mode
into the basic template plugin generated by Qt Creator.
How to interface with:
void ExamplePlugin::triggerAction()
{
QMessageBox::information(Core
::ICore::instance()->mainWindow
(),
tr("Action triggered"),
tr("This is an action from Example."));
}
void ExamplePlugin::triggerAction()
{
QMessageBox::information(Core::ICore::instance()->mainWindow(),
tr("Action triggered"),
tr("This is an action from Example."));
}
To copy to clipboard, switch view to plain text mode
Should my code for the Qt Creator plugin acts as a library of the template plugin?
Thank you for any reply.
Bookmarks