Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Where do I set QT_CONFIG = menu ?
Qt 6.12 LTS is out! See what's new in the release blog

Where do I set QT_CONFIG = menu ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 1.7k Views 3 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    class QMdiSubWindow header has this option

    #if QT_CONFIG(menu)
    void setSystemMenu(QMenu *systemMenu);
    QMenu *systemMenu() const;
    #endif

    It enables usage of QMenu etc.

    I am unable to find where to set
    QT_CONFIG = menu'

    Add of QT_CONFIG = menu to .pro file has no desired effect - still cannot code menu functions.

    JonBJ 1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by Chris Kawa
      #2

      This is not something you can turn on or off in your project. This macro is for querying whether that feature was enabled or not during compilation of Qt itself i.e. code inside that ifdef will be enabled if Qt was build with support for that particular feature.

      It is specified by using the -feature or -no-feature option of the configure tool when compiling Qt.

      Btw. I doubt that any widely distributed Qt build would have support for menus disabled. Are you sure this is the issue you're having?

      A 1 Reply Last reply
      2
      • A Anonymous_Banned275

        class QMdiSubWindow header has this option

        #if QT_CONFIG(menu)
        void setSystemMenu(QMenu *systemMenu);
        QMenu *systemMenu() const;
        #endif

        It enables usage of QMenu etc.

        I am unable to find where to set
        QT_CONFIG = menu'

        Add of QT_CONFIG = menu to .pro file has no desired effect - still cannot code menu functions.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @AnneRanch said in Where do I set QT_CONFIG = menu ?:

        still cannot code menu functions.

        Show a line of code you attempted together with the error message.

        1 Reply Last reply
        0
        • Chris KawaC Chris Kawa

          This is not something you can turn on or off in your project. This macro is for querying whether that feature was enabled or not during compilation of Qt itself i.e. code inside that ifdef will be enabled if Qt was build with support for that particular feature.

          It is specified by using the -feature or -no-feature option of the configure tool when compiling Qt.

          Btw. I doubt that any widely distributed Qt build would have support for menus disabled. Are you sure this is the issue you're having?

          A Offline
          A Offline
          Anonymous_Banned275
          wrote on last edited by Anonymous_Banned275
          #4

          @Chris-Kawa

          Configure should be run from the main Qt source directory

          Thanks, now I need to figure out with "source directory" I am using .
          I have downloaded way too many....

          Sorry , I missed the last lione.
          No, I am not sore .
          I was trying to reuse MDI example and because my project is based on MDI example it did not go well.
          SO I decided to build MDI from scratch and I have "add subwindow " sort of working.
          Now I am trying to add "menu" and not sure I am doing it right.
          ( I am not sure I have ":QMenu" module implemented correctly - for the entire project ..")

          I will rake a look a the MDI example an see hove "they " did it.

          It is very nice example , but has absolutely no comments to see what is happening... I think the developers deliberately remove comments when an example is made public...

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mchinand
            wrote on last edited by
            #5

            @AnneRanch said in Where do I set QT_CONFIG = menu ?:

            I think the developers deliberately remove comments when an example is made public...

            I don't think that's true, but some examples do have more comments than others. I'm guessing the MDI example is pretty old as the MDI UI interface doesn't seem very common anymore.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #6

              My coding philosophy is to keep the screen void of unnecessary stuff - which seem to be just opposite what coders do.
              I like TAB and MDI just because of that.
              The reason I commented on lack of comment is because the example is build from several QT classes and it is very compact.
              I am try to replicate MDI using QDesigner and I am having hard time putting it nicely together.

              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