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 && c++ type
Qt 6.11 is out! See what's new in the release blog

qml && c++ type

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 3 Posters 1.9k 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.
  • lengedL Offline
    lengedL Offline
    lenged
    wrote on last edited by
    #1

    How can I find all the qml types in C++ , why qt set some C++ class that instantiates qml type private. it is not comfortable using setProperty(), property(),and invokemethod() to handling the ui controls in c++

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Vincent007
      wrote on last edited by Vincent007
      #2

      in your .pro file, add
      QT += quick-private qml-private

      in your cpp files, add
      #include <QtQml/private/
      #include <QtQuick/private/

      lengedL 1 Reply Last reply
      0
      • V Vincent007

        in your .pro file, add
        QT += quick-private qml-private

        in your cpp files, add
        #include <QtQml/private/
        #include <QtQuick/private/

        lengedL Offline
        lengedL Offline
        lenged
        wrote on last edited by
        #3

        @Vincent007 I cannot find any information about quick-private in help documents. Can you provide me any details about quick-private class library information. thank you very much

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          Before anything else: why do you need to access the private parts of Qt ?

          There's no special documentation about them because they are not part of the public API so their content can be changed or nuked at any time.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          lengedL 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi and welcome to devnet,

            Before anything else: why do you need to access the private parts of Qt ?

            There's no special documentation about them because they are not part of the public API so their content can be changed or nuked at any time.

            lengedL Offline
            lengedL Offline
            lenged
            wrote on last edited by
            #5

            @SGaist It is just because personal behave. I like putting logic level in c++, qml just used to UI declaration

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              That doesn't explain why you are trying to access Qt's private parts. You don't need that in order to provide C++ implemented objects to QML.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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