Qt Quick for desktop – yes or no?

I should begin by telling my background. I have several years of experience using the Qt Widgets, so I know them quite well. On the other hand, I decided to try the Qt Quick when implementing user interface for Lyli this December, so I’m still quite new to the world of QML and Qt Quick. However I feel that I’ve seen enough to evaluate both on their usefulness for the desktop development.

The short answer to the question in topic is “No, at least not yet.” It’s not that I don’t like QML. I actually like it a lot. It’s really easy to create a custom interface using QML. But that’s the thing – it’s great for designing custom interfaces, such as ones used on smart phones or tablets, but not for desktop with a “standard” set of interface elements.

The problem of Qt Quick is the lack of good standard interface elements. There is a Qt Quick Controls module that provides some of the basic modules, such as buttons, labels and check boxes. But it still feels limited, and you will probably have to design some of the elements yourself. Which is not as easy as it looks, because for a good integration with the desktop you need to take things like theme colors and default fonts into account.

The other thing is the lacking behavior of the default views. Often, you have to implement basic things like multiselection on your own, while with Qt widgets this is a matter of setting a corresponding property (so far the only view that I found that provides some extended selection mode is TableView). Another example is a problematic connection of some of the existing Qt Models to QML. Take browsing the file system as an example. So far I found only two options – either subclass the QFileSystemModel to add option to change the model index from QML, or use the FolderListModel. None of these options is nearly as comfortable as the widget’s approach.

Once Qt Quick Controls provide similar set of widgets as as the standard Qt Widgets with a similar functionality, there would be little reason to use the C++ widgets. Until then, the C++ Qt Widgets is a better choice.

Leave a comment