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.
The text was updated successfully, but these errors were encountered:
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 had to modify the LSLCMake script to add an argument to the windeployqt call.
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.The config file it generates is very clean too:
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.The text was updated successfully, but these errors were encountered: