Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Is it ok when I create QML qtquick file for every UI block?



  • It’s kinda weird question but I just learned qt quick for a week or so, but I found it’s so powerful with UI designerB8DAF9AC-D822-4B45-A2F8-074F9C3FBD53.png
    Every UI element ( a page, a part of a page that has complex element, a card….) I created a QML file and at the main view, I call them as component and set Id for each one( so in this way they’re not visible)
    Every time I need them to show up, for example in a stack view, I push them in, or in gridview, I set them as the delegate, I don’t know if this way of using QML file is right or wrong( I treat all QML as control with properties).![alt text](image url)
    I don’t know if this way is good for long run, in the image attached, lef panel is a stackview with content is a qml file, in that qml is another set of multiple qml file that throw in a column…
    Sorry for my bad english


  • Qt Champions 2017

    There is nothing like a wrong. It is better to create the individual loadable qml files. You should load or create objects from qml which are not visible. If one screen itself is very complete, it is better to break them into smaller pieces and use them.


Log in to reply