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. QMenuBar QAction MenuRole for "View / Enter Full Screen" menu item
Qt 6.11 is out! See what's new in the release blog

QMenuBar QAction MenuRole for "View / Enter Full Screen" menu item

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 88 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.
  • Z Offline
    Z Offline
    zacstewart
    wrote last edited by
    #1

    I'm not sure since when but macOS began injecting a new menu item into the View menu called "Enter Full Screen". On my keyboard (Traditional Chinese / English dual) it defaults to the "Fn+F" key combo. The Fn key on this keyboard is by default the "change input mode" key for entering Chinese and has a Globe icon. In the Menu bar it appears like "Globe+F".

    However, on some apps like Firefox it has it's own hotkey for entering fullscreen (Ctrl+cmd+f) and successfully updates the menu with that, so I know this automatic menu item is configurable.

    I suspect this would be similar to how the About or Preferences menus can be manipulated with MenuRoles, but there is no ToggleFullScreen menu role. I couldn't find any discussion online about this, so I'm wondering if this is something that's even on the radar.

    1 Reply Last reply
    0
    • Nils SjobergN Offline
      Nils SjobergN Offline
      Nils Sjoberg
      wrote last edited by
      #2

      You must add a menu item to the View yourself, via a short Objective-C++ code, with the action selector toggleFullScreen: and the keyboard shortcut you want — once AppKit detects that such an item already exists, it will not add the automatic item with Fn+F and will honor your shortcut instead.

      "What's up, Doc?"

      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