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

As @cyborg-x1 mentioned, the tabbing functionality is part of Qt.

For the following, first, a disclaimer: the UIs I've implemented have used librviz, not rqt, so I've never had to worry about inter-widget communication (I created and set up the QMainWindow myself). Also, all my Qt work has been strictly in C++; any pyQt is possibly different. And, rqt may incorporate/hide/expose functionality that makes everything below irrelevant...I just don't know. With that said...perhaps it'll be of assistance.

The Qt QMainWindow provides the ability to tabify QDockWidgets. When a QDockWidget's docking location changes, it emits a dockLocationChanged signal; with an appropriate Qt 'connection' to a slot, one can program reactions to widget relocations.

Through various (rather convoluted) means, you can programmtically manipulate QDockWidgets through the QMainWindow. Not the easiest item to access, but I've successfully retrieved it in an RViz Display subclass via the following:

QMainWindow* main = static_cast<qmainwindow*>(context_->getWindowManager()->getParentWindow());

where context_ is an (inherited from Display) instance of rviz::DisplayContext (as implemented by the rviz::VisualizationManager).

I don't recommend going down this path, but if you do, that should give you a bit of a start on what will be involved.