Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8789089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:18:21+00:00 2026-06-13T22:18:21+00:00

I noticed that qmake passes all C++ preprocessor flags to the moc utility. I

  • 0

I noticed that qmake passes all C++ preprocessor flags to the moc utility. I tried moc without these flags on one file and it produced identical results. My question is: would there be cases in which moc would need these flags?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:18:22+00:00Added an answer on June 13, 2026 at 10:18 pm

    moc creates a CPP file which manages the SLOTS and SIGNALS of the class.

    if any of those are under preprocessor rules, MOC needs to know about it.
    for example:

    class A {
     Q_OBJECT
    public slots:
    #ifdef ENABLE_SLOT1
      void slot1();
    #endif;
      void slot2();
    };
    

    if you run moc without a “-DENABLE_SLOT1” parameter then the generated CPP file will not have any idea that it need to generate code handling slot1().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed that my Designer.vb file of one of my forms has a lot
I noticed that there are two sets of Hadoop configuration parameters: one with mapred.*
I noticed that I can't combine --traditional options with the other one letter other
I noticed that JAR, WAR and EAR files have a MANIFEST.MF file under the
I noticed that all the Facebook applications that running inside an iframe hiding their
I noticed that most (all?) .winmd files have a version of 255.255.255.255 like: Windows,
I noticed that yesterday all the Fixed-width canvas apps started looking strange: the Facebook
I noticed that when I use echo to print something to a file in
i noticed that paypal displays a very different favicon, one that's not just a
I noticed that a raw type of a generic class can take(point to) all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.