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. Qml dynamic component creation <SOLVED>
Forum Updated to NodeBB v4.3 + New Features

Qml dynamic component creation <SOLVED>

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • N Offline
    N Offline
    narayanan.krish
    wrote on last edited by
    #1

    Hello all !,

    I am having two qml files, main.qml & task.qml. I am launching task.qml on a mouse click from main.qml using Qt.createComponent.
    Now I want to pass a signal from Task.qml to main.qml on a mouse click.
    and
    I want to pass a signal from qt main.cpp to task.qml and vice-versa.
    Kindly help me to fix it.

    Thanks & Regards,
    Narayanan K

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Refer this link

      http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppintegration-interactqmlfromcpp.html

      Also look fro Signal Handler Event system of QML

      You can emit signal from task.qml. Have the reference of task.qml in main.qml. In main.qml connect the signal with one of your function written in main.qml. You can use the ID of task.qml in main.qml to connect. Rest of the things will work.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • N Offline
        N Offline
        narayanan.krish
        wrote on last edited by
        #3

        Thanks a lot.
        It worked as I expected.

        Thanks & Regards,
        Narayanan K

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          Good to hear that. Also can edit you question put it as <SOLVED> at the top. This helps always.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          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