Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to add business logic to a QT Design Studio generated .ui.qml component
Forum Updated to NodeBB v4.3 + New Features

How to add business logic to a QT Design Studio generated .ui.qml component

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 483 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marco Veglio
    wrote on last edited by
    #1

    Hi all,

    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?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Thomas Hartmann
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      1
      • leenamiettinenL Offline
        leenamiettinenL Offline
        leenamiettinen
        wrote on last edited by
        #3

        We have some instructions about converting Qt Design Studio projects into Qt Quick Applications in the documentation here:
        https://doc.qt.io/qtdesignstudio/quick-converting-ui-projects.html

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved