KanoopGuiQt
1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
tabwidget.h
1
#ifndef TABWIDGET_H
2
#define TABWIDGET_H
3
4
#include <QTabWidget>
5
#include <Kanoop/gui/libkanoopgui.h>
6
7
/**
8
* @brief QTabWidget subclass that emits a per-tab context-menu signal.
9
*
10
* TabWidget connects the tab bar's customContextMenuRequested signal to an
11
* internal handler that maps the click position to a tab index and re-emits
12
* tabCustomContextMenuRequested() with that index.
13
*/
14
class
LIBKANOOPGUI_EXPORT
TabWidget
:
public
QTabWidget
15
{
16
Q_OBJECT
17
public
:
18
/**
19
* @brief Construct with an optional parent.
20
* @param parent Optional QWidget parent
21
*/
22
explicit
TabWidget
(QWidget *parent =
nullptr
);
23
24
signals:
25
/**
26
* @brief Emitted when the user right-clicks on a tab.
27
* @param index Zero-based index of the tab that was right-clicked
28
*/
29
void
tabCustomContextMenuRequested
(
int
index);
30
};
31
32
#endif
// TABWIDGET_H
TabWidget
QTabWidget subclass that emits a per-tab context-menu signal.
Definition
tabwidget.h:15
TabWidget::tabCustomContextMenuRequested
void tabCustomContextMenuRequested(int index)
Emitted when the user right-clicks on a tab.
TabWidget::TabWidget
TabWidget(QWidget *parent=nullptr)
Construct with an optional parent.
include
Kanoop
gui
widgets
tabwidget.h
Generated by
1.9.8