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. Item and QQuickItem relation
Qt 6.11 is out! See what's new in the release blog

Item and QQuickItem relation

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 549 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.
  • V Offline
    V Offline
    Vinoth Rajendran4
    wrote on last edited by
    #1

    Hi All,

    In Qt Document, it's mentioned that Item instantiates QQuickItem class. That means Item is an object created from QQuickItem class.

    My Question is,
    -> If Item is an object of QQuickItem, why does Item has properties such as anchors , whereas QQuickItem does not ?

    My understanding is, since Item is an object of QQuickItem, Item should have only properties available in QQuickItem.

    Please help me understand, what i am missing ...

    Thanks in advance

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You do not see anchors property in documentation of QQuickItem, because it is a private property. See the code: https://code.woboq.org/qt5/qtdeclarative/src/quick/items/qquickitem.h.html#121 So, anchors are there in QQuickItem class, you just don't see them in docs.

      In practice this is something you don't need to worry about at all - QML engine handles it seamlessly.

      (Z(:^

      V 1 Reply Last reply
      3
      • sierdzioS sierdzio

        You do not see anchors property in documentation of QQuickItem, because it is a private property. See the code: https://code.woboq.org/qt5/qtdeclarative/src/quick/items/qquickitem.h.html#121 So, anchors are there in QQuickItem class, you just don't see them in docs.

        In practice this is something you don't need to worry about at all - QML engine handles it seamlessly.

        V Offline
        V Offline
        Vinoth Rajendran4
        wrote on last edited by
        #3

        @sierdzio : Thanks for the reply.

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