Results 1 to 1 of 1

Thread: Using QML timeline in a C++ framework

  1. #1
    Join Date
    Feb 2014
    Posts
    26
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Using QML timeline in a C++ framework

    Hi,

    Having quite a beefy C++ project. Starting from scratch would be last resort. New features like “Flow” layout and Timeline are quite attractive but unfortunately, never made it to the QT C++ framework. I’m wondering if it’s possible to leverage QML inside a C++ QApplication?

    More specifically, how would someone go about “creating” a QML Timeline and use it in a C++ QMainWindow?

    My guess is YES as I’ve seen this example but can’t really compile and test it on windows:

    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QGuiApplication app(argc, argv);
    4.  
    5. QSurfaceFormat::setDefaultFormat(QQuick3D::idealSurfaceFormat());
    6. qputenv("QT_QUICK_CONTROLS_STYLE", "Basic");
    7.  
    8. QQmlApplicationEngine engine;
    9. engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    10. if (engine.rootObjects().isEmpty())
    11. return -1;
    12.  
    13. return app.exec();
    14. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by neosettler; 29th June 2024 at 00:58.

Similar Threads

  1. How to make a timeline ?
    By azsde in forum Qt Programming
    Replies: 0
    Last Post: 27th May 2015, 13:21
  2. Qt Timeline Widget/View
    By DigiDrag in forum Jobs
    Replies: 0
    Last Post: 18th October 2013, 16:44
  3. Creating a graphic timeline
    By kaushal_gaurav in forum Qt Programming
    Replies: 2
    Last Post: 26th November 2012, 14:03
  4. timeline
    By franco.amato in forum Qt Programming
    Replies: 18
    Last Post: 10th December 2009, 02:28

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.