Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QQuickView or QQmlApplicationEngine or QQuickWidget

QQuickView or QQmlApplicationEngine or QQuickWidget

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    ustulation
    wrote on last edited by
    #1

    I had completed several months back, a desktop project from scratch to its release taking more than one and half years, with Qt-c++/QML combination. Ofcourse I had no idea of QML/QtQuick before that and must say I learnt a lot. Now as my team looks to start another front end project from scratch, I realize that there are more ways then to start than I had previously known. The previous project used a custom QQuickView derivative. When multiple windows were required to show on different screens, I had to spawn or destroy multiple instances of that class and all was good. However now I notice there are more choices - QQmlApplicationEngine, QQuickWidget etc instead of QQuickView. For multiple windows, single QQmlApplicationEngine can be given different root qml files and each window can be accessed (after proper casting) via QQmlApplicationEngine::​rootObjects().value(<n>). Haven't read much into QQuickWidget specially after it said there is some performance hit using that.

    So can someone provide a nice guideline of when to use which approach and their advantages over the other ?

    For eg., In my QQuickView derivative I could easily handle the events by overriding the appropriate virtuals. Don't know if that would be possible/convenient for QQmlApplicationEngine approach, etc.

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      Start by reading "this thread":http://qt-project.org/forums/viewthread/49581

      Use QQuickWidget if (and only if) you want to integrate your QML GUI into a C++ QWidget-based GUI.

      Post back if you'd like anything clarified.

      [quote author="ustulation" date="1421583894"]For eg., In my QQuickView derivative I could easily handle the events by overriding the appropriate virtuals. Don't know if that would be possible/convenient for QQmlApplicationEngine approach, etc.[/quote]What kind of events do you mean?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved