QTabBar subclass that emits a context-menu signal for individual tab indices.
More...
#include <tabbar.h>
|
| | TabBar (QWidget *parent=nullptr) |
| | Construct with an optional parent.
|
| |
|
|
virtual void | mousePressEvent (QMouseEvent *event) override |
| | Intercept right-click presses to emit the context-menu signal.
|
| |
QTabBar subclass that emits a context-menu signal for individual tab indices.
TabBar intercepts right-click events and emits tabCustomContextMenuRequested() with the index of the tab under the cursor, allowing callers to show a per-tab context menu without subclassing further.
Definition at line 14 of file tabbar.h.
◆ TabBar()
| TabBar::TabBar |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Construct with an optional parent.
- Parameters
-
| parent | Optional QWidget parent |
◆ tabCustomContextMenuRequested
| void TabBar::tabCustomContextMenuRequested |
( |
int |
index | ) |
|
|
signal |
Emitted when the user right-clicks a tab.
- Parameters
-
| index | Logical index of the tab that was right-clicked |
The documentation for this class was generated from the following file: