KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
TabWidget Class Reference

QTabWidget subclass that emits a per-tab context-menu signal. More...

#include <tabwidget.h>

+ Inheritance diagram for TabWidget:
+ Collaboration diagram for TabWidget:

Signals

void tabCustomContextMenuRequested (int index)
 Emitted when the user right-clicks on a tab.
 

Public Member Functions

 TabWidget (QWidget *parent=nullptr)
 Construct with an optional parent.
 

Detailed Description

QTabWidget subclass that emits a per-tab context-menu signal.

TabWidget connects the tab bar's customContextMenuRequested signal to an internal handler that maps the click position to a tab index and re-emits tabCustomContextMenuRequested() with that index.

Definition at line 14 of file tabwidget.h.

Constructor & Destructor Documentation

◆ TabWidget()

TabWidget::TabWidget ( QWidget *  parent = nullptr)
explicit

Construct with an optional parent.

Parameters
parentOptional QWidget parent

Member Function Documentation

◆ tabCustomContextMenuRequested

void TabWidget::tabCustomContextMenuRequested ( int  index)
signal

Emitted when the user right-clicks on a tab.

Parameters
indexZero-based index of the tab that was right-clicked

The documentation for this class was generated from the following file: