Remix.run Logo
ahartmetz 4 days ago

In Qt, have found that it's often best (much less and simpler code) to have simple editing actions right in the model, which has the data available anyway. The distinction between model and controller buys you nothing but a lot of extra code and complication in such cases.

As someone mentioned in another thread, a separate controller starts to make sense if there are several views or views + other parts that somehow access (some of) the same data.

Qt model-view initially didn't even involve QML by the way, and QTreeView etc still exist for the classic desktop look and feature set. I don't use them much anymore neither, but that's because I mostly do embedded stuff. I wouldn't want my e-mail client or text editor to be written in QML though.