On this page

menuEntry QML Value Type

MenuEntry message. More...

Import Statement: import QtRos2.VisualizationMsgs
Status: Experimental Extension

Properties

Detailed Description

Each InteractiveMarker message has an array of MenuEntry messages. A collection of MenuEntries together describe a menu/submenu/subsubmenu/etc tree, though they are stored in a flat array. The tree structure is represented by giving each menu entry an ID number and a "parent_id" field. Top-level entries are the ones with parent_id = 0. Menu entries are ordered within their level the same way they are ordered in the containing array. Parent entries must appear before their children.

Example: - id = 3 parent_id = 0 title = "fun" - id = 2 parent_id = 0 title = "robot" - id = 4 parent_id = 2 title = "pr2" - id = 5 parent_id = 2 title = "turtle"

Gives a menu tree like this:

  • fun
  • robot
  • pr2
  • turtle

menuEntry is a structured value type usable in QML. It maps directly to the visualization_msgs::msg::MenuEntry ROS 2 message type.

Construct a menuEntry in QML by assigning a JavaScript object whose keys are its component properties, or by setting those properties individually.

See also MenuEntryPublisher and MenuEntrySubscriber.

Property Documentation

command : string

Arguments to command indicated by command_type (below)

commandType : uint8_t

id : uint32_t

ID is a number for each menu entry. Must be unique within the

control, and should never be 0.

parentId : uint32_t

ID of the parent of this menu entry, if it is a submenu. If this

menu entry is a top-level entry, set parent_id to 0.

title : string

menu / entry title

© 2026 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 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.