I just started learning QML, with no previous experience in Qt or GUI development in general. My first task is to write a file manager. So far what I like about QML is that I can do design in plain text, but it's been quite challenging finding the way around to achieve even simple things. Currently I use Qt.labs.FolderListModel 2.1
as the work horse for directory listing, and I haven't even touched C++ or PyQt yet, it's purely QML now.
So I have a few questions regarding the future path of my little file manager:
- Is
FolderListModel
powerful enough to do all the things a versatile file manager can do? As far as I see,QFileSystemModel
looks more feature complete? And the fact that the former is inQt.labs
worries me a bit. If indeedFolderListModel
is meant to be used as a "quick-and-dirty" thing, does that mean that it's better to switch toQFileSystemModel
sooner? Since I approached the Qt world from QML rather than the traditional C++ angle, what is it like to replace my currentFolderListModel
code in QML to something backed by Qt/C++ or PyQt? - Related: I heard that it's actually possible to write complete applications in pure QML (with JavaScript). If the application is driven by some back-end, e.g. a database, I can see that QML alone is probably not expressive enough. However, in my case of writing a file manager, despite the "performance" argument, is it a good idea to try to stick to pure QML, using JavaScript for all the business logic?
I have been working recently on a simple file manager in QML. The problems you will face if you stick only to QML are:
Fortunately it is easy to connect C++ classes with QML so you will always be able to expand default QML features.
How to connect C++ and QML: http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html