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. Preprocessor macros
Qt 6.11 is out! See what's new in the release blog

Preprocessor macros

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 3 Posters 3.2k 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.
  • M Offline
    M Offline
    melghawi
    wrote on last edited by
    #1

    Hi everyone.

    Can someone explain to me the purpose of the Q_QUICK_AUTO_EXPORT and the Q_QUICK_PRIVATE_EXPORT macros.

    Thank you in advance.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      Hello

      Looks like there are no macros what are you talking about. I searched on devnet, google and in assistant. No one knows them :(

      1 Reply Last reply
      0
      • M Offline
        M Offline
        melghawi
        wrote on last edited by
        #3

        Sorry, I meant Q_AUTOTEST_EXPORT "qquickloader_p.h":https://qt.gitorious.org/qt/qtdeclarative/blobs/8b62bb86cd94287a29fd1474efe04822523600df/src/quick/items/qquickloader_p.h#line50

        Q_QUICK_PRIVATE_EXPORT "qsgdistancefieldglyphnode_p_p.h":http://qt.gitorious.org/qt/qtdeclarative/blobs/83e820ba767c2d37600d3536ebcfde18234d2f46/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h#line51

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tucnak
          wrote on last edited by
          #4

          Oh. They are macros for inner Qt usage (Qt Autotest environment). Learn more: http://qt-project.org/wiki/Qt_Autotest_Environment

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chrisadams
            wrote on last edited by
            #5

            The private export is so that you can add "QT += quick-private" and you'll be able to link against the private classes. It'll lock you to that specific (major/minor/patch) version of Qt, since there are no SC/BC guarantees for private classes.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              melghawi
              wrote on last edited by
              #6

              Very well explained. Thank you tucnak and chrisadams for your answers.

              Another question. I'm trying to use the QQuickLoader directly in my c++ code and I do not mind being tied down to one particular version of Qt but I keep getting unresolved external symbol errors. Any ideas?

              1 Reply Last reply
              0
              • C Offline
                C Offline
                chrisadams
                wrote on last edited by
                #7

                And you have "QT += qml quick qml-private quick-private" in your .pro? You may also need the v8-private (I think that's module name for qmake's purposes, it might be jsbackend-private I don't remember) but I don't really know.

                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