Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Signalling to QML based on 'id'
Qt 6.12 LTS is out! See what's new in the release blog

Signalling to QML based on 'id'

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

    Hi All,

    I have a Layout QML file which has several other nested sub-layout QMLs.
    I have created a main.qml file, inside which I create two instances of Layout QML say "left" and "right".
    I have two tcp client application which receives data from two different sources.
    All I need to do is receive data from tcp client and signal it to the respective Layout QML.

    Is there a way that I could use the QML 'id' and signal via my cpp program.
    I have already referred topics: https://doc.qt.io/qt-5/qtqml-cppintegration-topic.html
    https://doc.qt.io/qt-5/qtqml-cppintegration-topic.html and https://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html#connecting-to-qml-signals

    Thanks in advance.

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2

      You can set objectName to any item in QML and then use findChild method of QObject on C ++ side. But it looks like you shold reconsider app architecture, something like controller is would be useful to your app.

      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
      • Unsolved