Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How do I include QMetaObjectBuilder in my QT 5.12 project?

    General and Desktop
    qmetaobject
    2
    3
    344
    Loading More Posts
    • 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.
    • F
      feistykittykat last edited by feistykittykat

      Hey folks, hopefully this has a simple answer. Basically, I'm porting in some code that uses the QMetaObjectBuilder class, and for the life of me I can't figure out which header contains it. I've tried

      <private/qmetaobjectbuilder_p.h>
      

      and various iterations on that, but no dice.

      F 1 Reply Last reply Reply Quote 0
      • F
        feistykittykat @feistykittykat last edited by feistykittykat

        @feistykittykat I found it with

        #include <QtCore\5.12.2\QtCore\private\qmetaobjectbuilder_p.h>
        

        but I'm not sure that this is the right way to go, since now I'm getting an error from that file that

        #include <QtCore/private/qglobal_p.h>
        

        cannot be found. Is there a less janky way of including this successfully?

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          AFAIR, you need to add QT += core-private to your .pro file.

          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 Reply Quote 1
          • First post
            Last post