Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is there somewhere a list with all Qt macros in the documentation?
QtWS25 Last Chance

Is there somewhere a list with all Qt macros in the documentation?

Scheduled Pinned Locked Moved Solved General and Desktop
macrosdocumentationmacro docs
7 Posts 3 Posters 1.4k 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.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by
    #1

    Finding the proper documentation is especially painful for Qt macros e.g. QT_FORWARD_DECLARE_CLASS .

    What is the trick to the documentation?

    Vote the answer(s) that helped you to solve your issue(s)

    kshegunovK 1 Reply Last reply
    0
    • K koahnig

      Finding the proper documentation is especially painful for Qt macros e.g. QT_FORWARD_DECLARE_CLASS .

      What is the trick to the documentation?

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by kshegunov
      #2

      There's none. Usually you'd find these in the QtGlobal header's documentation, but some are spread over. Specifically QT_FORWARD_DECLARE_CLASS is not really for you (i.e. as a user programmer) to use, it's for Qt. You should hardcode the Qt namespace if you decide to use it, as using it is both binary and source incompatible with not using it.

      Read and abide by the Qt Code of Conduct

      K 1 Reply Last reply
      3
      • kshegunovK kshegunov

        There's none. Usually you'd find these in the QtGlobal header's documentation, but some are spread over. Specifically QT_FORWARD_DECLARE_CLASS is not really for you (i.e. as a user programmer) to use, it's for Qt. You should hardcode the Qt namespace if you decide to use it, as using it is both binary and source incompatible with not using it.

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        @kshegunov

        Thanks for feedback.

        I am trying to understand some Qt classes for some other implementation in a similar matter.

        Vote the answer(s) that helped you to solve your issue(s)

        kshegunovK 1 Reply Last reply
        0
        • K koahnig

          @kshegunov

          Thanks for feedback.

          I am trying to understand some Qt classes for some other implementation in a similar matter.

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          @koahnig said in Is there somewhere a list with all Qt macros in the documentation?:

          I am trying to understand some Qt classes for some other implementation in a similar matter.

          Then you're stuck decoding the private classes. If someone documented them (and/or the macros) then you're in luck, otherwise it's really up to you.

          Read and abide by the Qt Code of Conduct

          K 1 Reply Last reply
          0
          • kshegunovK kshegunov

            @koahnig said in Is there somewhere a list with all Qt macros in the documentation?:

            I am trying to understand some Qt classes for some other implementation in a similar matter.

            Then you're stuck decoding the private classes. If someone documented them (and/or the macros) then you're in luck, otherwise it's really up to you.

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @kshegunov

            Thanks for the encouragement. Looked like an easy route for complete different implementation.

            Vote the answer(s) that helped you to solve your issue(s)

            JKSHJ 1 Reply Last reply
            0
            • K koahnig

              @kshegunov

              Thanks for the encouragement. Looked like an easy route for complete different implementation.

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              @koahnig It's not documentation, but F2 in Qt Creator is very useful for figuring out a macro.

              Also, if it's a public macro (like Q_DECLARE_METATYPE), then you can use a search engine by adding site:doc.qt.io/qt-5 to the search: https://www.google.com/search?q=site%3Adoc.qt.io%2Fqt-5%2F+Q_DECLARE_METATYPE (or use the browser extension at https://forum.qt.io/topic/35616/ )

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              K 1 Reply Last reply
              4
              • JKSHJ JKSH

                @koahnig It's not documentation, but F2 in Qt Creator is very useful for figuring out a macro.

                Also, if it's a public macro (like Q_DECLARE_METATYPE), then you can use a search engine by adding site:doc.qt.io/qt-5 to the search: https://www.google.com/search?q=site%3Adoc.qt.io%2Fqt-5%2F+Q_DECLARE_METATYPE (or use the browser extension at https://forum.qt.io/topic/35616/ )

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @JKSH

                Thanks, yes I am aware of this possibility in creator.

                IIRC I had encouraged you to publish the browser extension for Chrome. Great tool! Basically use it all the time.

                I have stumbled across a couple of macros without a trace of documentation. Personally I consider as a pity.

                Vote the answer(s) that helped you to solve your issue(s)

                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