Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. What does Moc.exe do?
Qt 6.12 LTS is out! See what's new in the release blog

What does Moc.exe do?

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 10.0k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Folks,
    This might be a beginner question but I tried searching the forum and the web for a formal explanation of what Moc.exe does and I couldnt find any information. From what I gather, Moc.exe is used to generate Meta Object Code from header files that define any classes derived from QT objects. That is, if I derive my own class from QTMainWindow or any other such class, moc.exe needs to generate cpp code that is required.
    Questions I have are.

    1. Is my understanding correct that moc.exe is only needed for classes that are derived from QT objects?
    2. What about classes that reference QT objects and dont derive from them?
    3. What is the role of the meta object code that moc.exe generates?
    4. Can anyone provide a link to more information on Moc.exe ?

    Thanks in Advance..

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Did you find "this docs page?":http://developer.qt.nokia.com/doc/qt-4.7/moc.html

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I cant believe I couldnt find that page.. Thank you !!

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