Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to add business logic to a QT Design Studio generated .ui.qml component
Marco Veglio last edited by
I'm trying to integrate QT Bridge, QT Design Studio and QT Creator in our development process.
Right now I can create the UI in Adobe PS and export it to QT DS thanks to the plugin. So I have a QTDS project with all the .ui.qml files (two forms with a few subcomponents, one per each relevant UI element)
I see that the business logic should be added in separate qml files. However, in my understanding this does not "add logic to existing components", but rather "creates new components which inherit the UI and then add business logic".
To simplify, let's say that I have a form (Artboard1_form.ui.qml) with two UI elements (Element_1_gui.ui.qml and Element_2_gui.ui.qml)
I can add two files (Element_1_logic.qml and Element_2_logic.qml) adding the business logic, but then they won't work seamlessly with the existing Artboard1_form.ui.qml which has the references to the _gui.ui.qml files. I would need to edit the QT DS generated file which would not cope well with future GUI updates.
Also, should I add an Artboard1_logic.qml file to add more business logic to the whole form that would not consider the "logic.qml" files I added as well.
And my understanding is that adding ".qml" files with same name of the .ui.qml ones is not going to work, since the system would find two components with same name.
Is there any way around this?
Thomas Hartmann last edited by
The cluster example (https://www.youtube.com/watch?v=aV6kFxH3Xws&t=3s and on the welcome screen) does describe at least one approach quite well.
leenamiettinen last edited by
We have some instructions about converting Qt Design Studio projects into Qt Quick Applications in the documentation here: