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 something equivalent to AUTOMOC_MACRO_NAMES in qmake?
Qt 6.11 is out! See what's new in the release blog

Is there something equivalent to AUTOMOC_MACRO_NAMES in qmake?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 538 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.
  • G Offline
    G Offline
    Glax
    wrote on last edited by
    #1

    I have a project in which the Q_OBJECT macro is hidden inside another macro and qmake doesn't seem to like that.

    With CMake there's AUTOMOC_MACRO_NAMES that I can set so my macro gets picked up to process the file with the moc.

    Is there a way of doing that with qmake? It's also OK if I can just specify all the files that need moc processing in the .pro.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Should work without specifying anything in particular, see https://forum.qt.io/topic/54053/force-moc-to-moc-a-file

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Glax
        wrote on last edited by
        #3

        no, it doesn't run the moc without Q_OBJECT. it doesn't need to be in the class but it does need to be present in the header file

        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