Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. do "tear off menus" work on mac?
Qt 6.11 is out! See what's new in the release blog

do "tear off menus" work on mac?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
8 Posts 3 Posters 3.5k 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.
  • davecotterD Offline
    davecotterD Offline
    davecotter
    wrote on last edited by
    #1

    the documentation doesn't say "no", and i know that NSMenus support it

    but when i try, no dice.

    1 Reply Last reply
    0
    • davecotterD Offline
      davecotterD Offline
      davecotter
      wrote on last edited by
      #6

      i'm pretty sure the answer is simply "no"

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi
        There is
        http://doc.qt.io/qt-5/qmenubar.html#nativeMenuBar-prop
        Maybe it must be on/off for it to work.

        Also this is default FALSE
        http://doc.qt.io/qt-4.8/qmenu.html#tearOffEnabled-prop

        1 Reply Last reply
        0
        • davecotterD Offline
          davecotterD Offline
          davecotter
          wrote on last edited by davecotter
          #3

          yes, if i turn OFF "native menu bar" then the menu "bar" shows at the top of the main window, which is absolutely not what i want (it doesn't look like a mac app) (in this config the tear off menus do indeed work)

          what i want is to use the native menu bar, and still have tear off menus. i guess that's not possible?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Hi,

            Can you show a minimal sample code that shows what you tried ?

            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
            0
            • davecotterD Offline
              davecotterD Offline
              davecotter
              wrote on last edited by
              #5
              ui->menuBar->setNativeMenuBar(false);
              ...
              menuP->setTearOffEnabled(true);
              

              that works. if the first call passes true, it fails

              1 Reply Last reply
              0
              • davecotterD Offline
                davecotterD Offline
                davecotter
                wrote on last edited by
                #6

                i'm pretty sure the answer is simply "no"

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #7

                  I might be wrong but it's likely because macOS tear off representation has been deprecated. See NSMenu setTearOffMenuRepresentation and NSMenuView isTornOff which both states that macOS doesn't support torn off menus.

                  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
                  1
                  • davecotterD Offline
                    davecotterD Offline
                    davecotter
                    wrote on last edited by davecotter
                    #8

                    I believe you are correct, but Qt could simply work around that. ie: not use the OS level tear off menus, but just implement them the same way as if not using the native menu bar.

                    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