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. Function call through loader...
Forum Update on Monday, May 27th 2025

Function call through loader...

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.5k 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
    aekam
    wrote on 16 Jul 2012, 11:44 last edited by
    #1

    I have four files in the same directory at same level.

    1] a.qml has a loaderA which loads a b.qml.
    2] b.qml has a loaderB which loads a c.qml.
    3] c.qml has a function.
    4] now i want to call these function from a d.js file.

    usually for one loader this can be achieved by loaderA.item.function, but how can i do it in this case.?
    loaderA.item.loaderB.item.function didn't work...

    If you take care of inches, you won't have to worry about miles... :)

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dmcr
      wrote on 16 Jul 2012, 12:01 last edited by
      #2

      a js file is included in one QML file.
      in this js file, you can use idItem.function()

      dmcr

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aekam
        wrote on 16 Jul 2012, 12:30 last edited by
        #3

        @dmcr
        yes, it works fine for function call through / for single loader.
        but when i have two loaders it doesn't work...
        [please re-read the problem]

        If you take care of inches, you won't have to worry about miles... :)

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dmcr
          wrote on 16 Jul 2012, 12:46 last edited by
          #4

          could you post the code please ?

          dmcr

          1 Reply Last reply
          0

          1/4

          16 Jul 2012, 11:44

          • Login

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