GammaRay API Documentation 3.0.1
Plugin Design Guide

This page lists a number of best practises for GammaRay plugins.

Common Infrastructure

Remote Support

While historically possible, plugins should not rely on the in-process mode, or offer some features only in in-process mode, but fully work out-of-process and thus also with remote devices.


There is a number of shared features worth considering:

  • If the plugin represents a user-interface framework, offer a remote view of the output using GammaRay::RemoteViewServer and GammaRay::RemoteViewWidget.
  • If the plugin deals with something using a QPainter, offer paint analyzer support via GammaRay::PaintAnalyzer.

Probe Plugin


There are a number of performance hot paths that affect the entire target application, the plugin should do minimal work on these. Particular care also has to be taken for multi-threading support there.

GUI Dependency

The probe plugin should not supply user interface assets (icons, colors, etc). System icons might not be available on the target (embedded) system, and color/palette settings might be incompatible with that of the client system. Instead, send semantically information to the client, and resolve user interface assets on the client side.

If the probe plugin does not have to link against Qt::Gui anyway, consider avoiding linking against it to avoid this problem in the first place.

User Interface

For the user-interface, consider the following:

All translation need to happen on the client side, QObject::tr() calls should be avoided in the probe plugin, as loading translation catalogs in the probe would interfere with the target application.


Object Navigation

If your plugin shows a selectable set of objects, offer object navigation:

  • inbound, ie. from other tools to your plugin, by handling GammaRay::Probe::objectSelected().
  • outbound, ie. from your plugin to other tools, by using GammaRay::ContextMenuExtension.

Source Navigation

Support source code navigation:


If the plugin provides a user interface, make sure it's covered in the user manual.

Quality Assurance

Each plugin should provide manual and automatic tests.

  • Automatic tests should cover object tracking and model code in particular.
  • Manual tests should enable all features in the plugin.

© 2010-2023 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
GammaRay Qt-application inspection and manipulation tool
Generated on Wed Jul 3 2024 00:08:13 for GammaRay API Documentation by doxygen 1.9.8