ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The widget you are adding needs to have a window title since that attribute is what you are expecting in the title bar of the widget (which is also used for the list of running plugins within the menu.

You can modify your code like this to provide a window title:

label = QLabel("Label in the demo plugin")
label.setWindowTitle('My title')
context.add_widget(label)

Since it is possible to create multiple instances of each plugin you likely want to distinguish them, see https://github.com/ros-visualization/rqt_graph/blob/90117a0b04c99d1baf4589dc97751fa3487883a4/src/rqt_graph/ros_graph.py#L121-L122 for an example.