- Extending Qt Creator Manual
- QtCreator
- IMode
- Extending Qt Creator Manual 13.0.0-beta2

# IMode Class

class Core::IMode

The IMode class represents a mode in Qt Creator. More...

Header: | #include <coreplugin/imode.h>
Inherits: | Core::IContext

## Detailed Description

This class defines a mode and its representation as a tool button in the mode selector on the left side of Qt Creator's main window.

Modes are used to show a different UI for different development tasks. Therefore modes control the layout of most of Qt Creator's main window, except for the tool bar on the left side and the status bar. For example Edit mode, the most commonly used mode for coding, shows the code editor and various navigation and output panes. Debug mode enhances that view with a configurable layout of debugging related information. Design mode reserves all the main window's space for the graphical editor.

A mode is an IContext. Set the context's widget to define the mode's layout.

Adding a mode should be done sparingly, only as a last reserve. Consider if your feature can instead be implemented as a INavigationWidgetFactory, IOutputPane, `Debugger::Utils::Perspective`, separate dialog, or specialized IEditor first.

If you add a mode, consider adding a NavigationWidgetPlaceHolder on the left side and a OutputPanePlaceHolder on the bottom of your mode's layout.

Modes automatically register themselves with Qt Creator when they are created and unregister themselves when they are destructed.