You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's late and I need to get to bed... I just wanted to share a couple thoughts on using QML.
After getting over the initial learning hump, I really liked it. It makes it easier to separate GUI logic from business logic. There are several different ways to communicate between C++ and QML; after you settle on one, the rest is pretty straightforward.
I really love its Settings component. See here for an example of how I used it. Upon first run it'll generate a file with the indicated name. With no filename specified, it'll use the default location, which for Windows is in the registry. These settings make bidirectional bindings between the GUI elements and the values in the config file, and are updated on the fly. And when you reopen the app, it restores the last settings.
I don't love its signal/slot syntax in some circumstance. e.g., here I create a new slot and then below I connect it to a signal (from C++). That's not a problem per se. Compare to here where I connect to an existing signal. In both cases I use the function keyword, and both look like function definitions, but the first is a new slot definition and the second is a reference to an existing signal. It's probably more succinct than having a property for the signal name then another property for the lambda, it just bothers me that it looks like a function definition but it isn't.
Activity
tstenner commentedon Jul 23, 2020
I've thought about it before, but hadn't gotten around to trying it out.
That's nice, my only worry is that it harder to share code between the GUI app and a CLI app, e.g. for LabRecorder.