Results 1 to 5 of 5

Thread: How to interface Qt Quick UI code with Qt creator pluing?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Question How to interface Qt Quick UI code with Qt creator pluing?

    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:
    Qt Code:
    1. QGuiApplication app(argc, argv);
    2. QQmlApplicationEngine engine("main.qml");
    3. QObject *root = engine.rootObjects().at(0);
    4. QQuickWindow *window =
    5. qobject_cast<QQuickWindow*>(root);
    6. if (!window) {
    7. qFatal("Error: No window found!");
    8. }
    9. window->show();
    10. 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:
    Qt Code:
    1. void ExamplePlugin::triggerAction()
    2. {
    3.  
    4. QMessageBox::information(Core::ICore::instance()->mainWindow(),
    5. tr("Action triggered"),
    6. tr("This is an action from Example."));
    7. }
    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.
    Last edited by anda_skoa; 25th April 2014 at 10:04. Reason: missing [code] tags

Similar Threads

  1. Replies: 2
    Last Post: 22nd February 2012, 00:33
  2. Replies: 3
    Last Post: 1st February 2012, 00:18
  3. Qt Creator qt creator code model
    By Vanir in forum Qt Tools
    Replies: 0
    Last Post: 5th October 2010, 11:10
  4. Creator Interface Question
    By manilla_wise in forum Newbie
    Replies: 1
    Last Post: 9th August 2010, 23:53
  5. How to turn off translator code in creator
    By sanfordpaul in forum Newbie
    Replies: 0
    Last Post: 4th March 2009, 23:39

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.