Is QML the Future of Qt Widgets?



  • (Moderator: Forgive me if I've posted this in the wrong forum. I can delete and repost in the proper forum if you prefer.)

    I'm a newbie. I wanted to know if the roadmap of Qt is to phase out Qt widgets and run everything through Qt Quick in the future?

    The other thought going through my mind is that if Qt Quick is the future, and it's rather limiting versus just building the interface in QWebView (which uses Chromium), then why not go with QWebView? For instance, I can draw complex interfaces with charts and 3D graphics far easier (and have far more examples) that work inside Chromium (and thus QWebView) than in Qt Quick. The other great thing is that UI coders these days understand web UIs far more than they do C++ UIs, which means we can leverage that skillset better on a C++ project if we use QWebView.


  • Moderators

    Hi @maximo,

    I wanted to know if the roadmap of Qt is to phase out Qt widgets and run everything through Qt Quick in the future?

    There are currently no plans to phase out Qt Widgets. Widgets are a very mature and useful technology, with different use cases from Qt Quick currently (Qt Widgets are suitable for static office-style GUIs, while Qt Quick is suitable for fluid mobile-style GUIs).

    Work is being done to make Qt Quick reach the same level of maturity as Qt Widgets, but there is still a long way to go. I think Qt Quick won't be ready to fully replace widgets for another 7 years, at least.

    Anyway, Qt Widgets even got some new features for the upcoming Qt 5.6 release: http://wiki.qt.io/New_Features_in_Qt_5.6

    The other thought going through my mind is that if Qt Quick is the future, and it's rather limiting versus just building the interface in QWebView (which uses Chromium), then why not go with QWebView? For instance, I can draw complex interfaces with charts and 3D graphics far easier (and have far more examples) that work inside Chromium (and thus QWebView) than in Qt Quick. The other great thing is that UI coders these days understand web UIs far more than they do C++ UIs, which means we can leverage that skillset better on a C++ project if we use QWebView.

    First, let's clarify some points:

    • "Qt Quick" refers to the basic visual components for GUI creation. The underlying language is QML (more on this later)
    • QWebView is based on Qt WebKit (now deprecated). It's QWebEngineView that is based on Chromium.

    In general, I think using well-known standards is a very good idea. However, there's one major obstacle that prevents us from replacing everything with Chromium: Apple doesn't allow it on iOS (which is an important target for Qt).

    Another disadvantage of using Chromium is that it's harder to integrate with C++. In contrast, QML was designed with C++ integration in mind. So, it's easy for developers to write complex, high-performance business logic in C++ while using Qt Quick for the GUI. This is what Google did with their VoltAir game: http://blog.qt.io/blog/2014/07/21/google-labs-voltair-game-built-with-qt/

    Also, note that there are QML modules which are not part of Qt Quick. For example, Qt Canvas 3D brings WebGL features to QML, but it doesn't use Qt Quick: https://blog.qt.io/blog/2015/05/27/introducing-qt-canvas3d/

    Anyway, QML should be quite easy for web devs to learn. The QML language is heavily influenced by CSS and JSON, and it incorporates JavaScript.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.