5 ms·
As others have pointed out, Slint is inspired from the good parts of QML. The Equivalent to QAbstractItemModel is the slint::Model class[1]. That API is actual
by ogoffart 3y ago
As others have pointed out, Slint is inspired from the good parts of QML.
The Equivalent to QAbstractItemModel is the slint::Model class[1].
That API is actually easier to use as it simple indices instead of the concept of QModelIndex/QPersistentModelIndex and 4D tables of tree of table. And it has sensible default implementation that works consistently. Since it is a template class, all the types are checked at compile time instead of wrap all data into a QVariant and hope the view will interpret it correctly.
Slint is also compiling everything to C++ (or whatever language you use Slint with), and it doesn't have the legacy of having to support JavaScript with dynamic typing and garbage collector.
[1] https://slint.dev/releases/1.4.1/docs/cpp/api/classslint_1_1Model https://slint.dev/releases/1.4.1/docs/cpp/api/classslint_1_1...
- rubymamis 3y agoVery cool. That will address some annoyances I had with QAbstractItemModel. Slint looks very promising. How is the text manipulation support in Slint? Does it support Rich Text content? BTW, the ListView linked from the article you mentioned leads to this page: https://slint.dev/releases/1.4.1/docs/slint/src/builtins/widgets.html#listview https://slint.dev/releases/1.4.1/docs/slint/src/builtins/wid...
- ogoffart 3y agoRich Text content is not yet implemented. This is tracked in https://github.com/slint-ui/slint/issues/2723 https://github.com/slint-ui/slint/issues/2723 Thanks for reporting the broken link. Fixed in https://github.com/slint-ui/slint/commit/9200480b532f49007d2e09b4dbaab60ecda68d6c https://github.com/slint-ui/slint/commit/9200480b532f49007d2...