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. Loader type as it should be
Forum Updated to NodeBB v4.3 + New Features

Loader type as it should be

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 193 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.
  • A Offline
    A Offline
    Archie888
    wrote on last edited by Archie888
    #1

    Hello,

    How to implement in QML or in C++ a Loader type that is more reasonable than the current one?

    What is needed:

    • Specify source or sourceComponent, as with current Loader
    • Otherwise works exactly like simply making the type declaration there and then:
      ** There is no 'item' attribute, and the instance is simply accessed via its id like any other QML object
      ** The relationship with the parent is straightforward, including anchoring and scope -- I assure you this is not my experience with current Loader, and it makes things quite difficult
      ** You simply set up the property values there and then, and it is not extremely painful like in current Loader:
    Loader {
        sourceComponent: myComponent
        intPropertyOfMyType: 123.4
        stringPropertyOfMyType: "hello"
        varPropertyOfMyType: someIdFromThisScopeHere
    }
    
    • Additional: At dev runtime, a file info tracker periodically checks if the source QML file gets changed in the project, and propagates the changes by hot reloading the object

    We very much need this.

    Cheers,
    -Archie

    EDIT:

    Plus, because my intrinsic goal is to achieve easy hot reloading and ability to iterate fast in development, it would help, if Qt Quick would have that out of the box. I tried Felgo, but there were numerous issues for my particular needs.

    Of course restarting a QML application does not necessarily take more than few seconds, but those seconds are too much if you want to truly iterate rapidly. Also, object state should be maintained when it can, unless there are major changes, so that the hot reload is useful for instance debugging some thing that happens in the GUI through a process of user activities. For instance, some menu popping up after some choices and navigations and so on, so that the application is truly in the close-to-similar state when the hot reload is done, letting you see the layouts of objects and so on, when you want to do fast iterations.

    1 Reply Last reply
    0

    • Login

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