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. The different behavior of Connections QML type
Qt 6.11 is out! See what's new in the release blog

The different behavior of Connections QML type

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

    I found QML type Connections is different. Why we call it different is that Connections can accept arbitrary signal handlers and notify handlers as you wish. If you want to put an non-existent handler into other QML type specification, the QML engine will not to execute and print an error:

    qrc:/main.qml:18 Cannot assign to non-existent property "onSomethingHappened"
    

    I want to make use of this particular feature and make my own QML type like Connections, so I take a deep research on it. How could I achieve that?

    我们自己的论坛:http://qtdream.com
    擅长三维角色仿真动画。

    1 Reply Last reply
    0
    • GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #2

      It uses an internal class : QQmlCustomParser.
      You can read more about it in this KDAB blogpost : https://www.kdab.com/qml-engine-internals-part-4-custom-parsers/

      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