3 ms·
note that a TodoMVC-like example can be reached in less than 150 lines of pure QML : https://github.com/jcelerier/TodoMVC-QML/blob/master/Main.qml https://githu
by jcelerier 8y ago
note that a TodoMVC-like example can be reached in less than 150 lines of pure QML : https://github.com/jcelerier/TodoMVC-QML/blob/master/Main.qml https://github.com/jcelerier/TodoMVC-QML/blob/master/Main.qm...
- oever 8y agoNice! QML is really great for these things. Author of the blog post here. I've started out the code in the post with a pure QML version of course and then replaced the model with a Rust model since the point of the blog is to show how to write the model in Rust. I like your solution of using a DelegateModel to show All, Completed or Active items. I went for a different approach: RowLayout { property bool show: filter.currentIndex === 0 || (filter.currentIndex === 1 && !completed) || (filter.currentIndex === 2 && completed) visible: show
- jcelerier 8y agocool :) Are you aware of Olivier Goffart's take on QML in Rust ? https://woboq.com/blog/qmetaobject-from-rust.html https://woboq.com/blog/qmetaobject-from-rust.html ; it seems that it could maybe be used instead of the custome code-gen you did. That's a great time for Qt and Rust, no doubt :p
- oever 8y agoYes, I proofread his blog post and tested the code. :-) Olivier's approach is very clever. Especially the method of extending Qt classes.