Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Qt for Python
Logo
Qt for Python
  • Getting Started
  • Commercial Use
  • Building from Source
  • Package Details
  • Modules API
  • Tools
  • Tutorials
  • Examples
  • Videos
  • Deployment
  • Considerations
  • Developer Notes
  • Release Notes
  • Module Index
Back to top

Menu Controls¶

Guidelines for menu controls

qml-qtquick-controls-contextmenu.html

The ContextMenu attached type provides a way to open a context menu in a platform-appropriate manner.

qml-qtquick-controls-menu.html

Menu popup that can be used as a context menu or popup menu.

qml-qtquick-controls-menubar.html

Provides a window menu bar.

qml-qtquick-controls-menubaritem.html

Presents a drop-down menu within a MenuBar.

qml-qtquick-controls-menuitem.html

Presents an item within a Menu.

Each type of menu control has its own specific target use case. The following sections offer guidelines for choosing the appropriate type of menu control, depending on the use case.

Menu Control¶

../_images/qtquickcontrols-menu.png

Menu control can be used for context menus; for example, after right-clicking. It can also be used for popup menus; for example, a menu that is shown after clicking a button.

MenuItem is an item in the Menu control. Each item in a menu:

  • displays text to the user

  • allows checking/unchecking

  • is highlighted (for example, on keyboard navigation)

  • performs some action on activation

MenuBar Control¶

../_images/qtquickcontrols-menubar.png

MenuBar control can be used for window menu bars.

MenuBarItem is an item in the MenuBar control. Each item in a menu bar:

  • displays text to the user

  • is highlighted (for example, on keyboard navigation)

  • pops up the respective menu on activation

Copyright © 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 (https://www.gnu.org/licenses/fdl.html) as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
Made with Sphinx and @pradyunsg's Furo
On this page
  • Menu Controls
    • Menu Control
    • MenuBar Control