Today, I participated in the Qt Nagoya study group.
It was my first time attending last time, so today was my second time.
Last time, due to [first time attending] + [first time seeing Qt (excuse)] + [setup failures causing many errors], I mostly just panicked and it ended. So today, I decided what I wanted to achieve and participated.
The result of the day is this.
今日のQt勉強会で作ったソフト。
— ayuma (@ayuma_x) June 16, 2018
C++使った開発環境でこんなにスムーズに作れるとは感動した。Qt Quickすげー。 pic.twitter.com/UpbV1nQKXx
By the way, the image shown in the video is borrowed from ImageNet.
I wanted to try implementing MVVM in Qt like in WPF, so I tried creating a mechanism to bind list-formatted model data to the View.
On the C++ side, I gathered image files from an arbitrary directory, created a list-formatted property using QQmlListProperty, and bound it to the View.
For the View, I set the left side as a ListView and the right side as a GridView, and plugged the same QQmlListProperty mentioned above into the model for each.
I also deliberately synchronized the selection state of the ListView and GridView via a C++ property.
Putting aside the appearance, functionally, I think it turned out quite well for me.
Since I went through a lot of trial and error, the source code is too messy to publish, but I plan to rewrite it all and upload it to GitHub eventually.
Today was fun.