PythonQt.QtGui.QTabWidget · declarations 001
Back to PythonQt.QtGui.QTabWidget
East
instance-attribute
East: Any
North
instance-attribute
North: Any
South
instance-attribute
South: Any
TabShape
instance-attribute
TabShape: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
Triangular
instance-attribute
Triangular: Any
West
instance-attribute
West: Any
addTab
addTab(widget: Any, icon: Any, label: Any) -> int
X.addTab(widget, icon, label) -> int
Supplemental documentation: Qt 5 reference:
int QTabWidget::addTab(QWidget *page, const QString \&label)
Adds a tab with the given page and label to the tab widget, and returns the index of the tab in the tab bar. Ownership of page is passed on to the QTabWidget.
If the tab's label contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g. if the label is "Bro\&wse" then Alt+W becomes a shortcut which will move the focus to this tab.
Note: If you call addTab() after show(), the layout system will try to adjust to the changes in its widgets hierarchy and may cause flicker. To prevent this, you can set the QWidget::updatesEnabled property to false prior to changes; remember to set the property to true when the changes are done, making the widget receive paint events again.
See also insertTab().
int QTabWidget::addTab(QWidget *page, const QIcon \&icon, const QString \&label)
This is an overloaded function.
Adds a tab with the given page, icon, and label to the tab widget, and returns the index of the tab in the tab bar. Ownership of page is passed on to the QTabWidget.
This function is the same as addTab(), but with an additional icon.
Upstream PySide2 reference signatures (binding differences may apply):
addTab(self, widget: PySide2.QtWidgets.QWidget, arg__2: str) -> int
addTab(self, widget: PySide2.QtWidgets.QWidget, icon: PySide2.QtGui.QIcon, label: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#addTab
changeEvent
changeEvent(arg__1: Any) -> None
X.changeEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QTabWidget::changeEvent(QEvent *ev)
Reimplements: QWidget::changeEvent(QEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
changeEvent(self, arg__1: PySide2.QtCore.QEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#changeEvent
clear
clear() -> None
X.clear()
Supplemental documentation: Qt 5 reference:
void QTabWidget::clear()
Removes all the pages, but does not delete them. Calling this function is equivalent to calling removeTab() until the tab widget is empty.
Upstream PySide2 reference signatures (binding differences may apply):
clear(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#clear
cornerWidget
cornerWidget(corner: Any) -> Any
X.cornerWidget(corner) -> PythonQt.QtGui.QWidget
Supplemental documentation: Qt 5 reference:
QWidget *QTabWidget::cornerWidget(Qt::Corner corner \= Qt::TopRightCorner) const
Returns the widget shown in the corner of the tab widget or nullptr.
See also setCornerWidget().
Upstream PySide2 reference signatures (binding differences may apply):
cornerWidget(self, corner: PySide2.QtCore.Qt.Corner=...) -> PySide2.QtWidgets.QWidget
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#cornerWidget
count
instance-attribute
count: int
Qt 5 reference:
count : const int
This property holds the number of tabs in the tab bar
By default, this property contains a value of 0.
Access functions:
| int | count() const |
|---|---|
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#count
currentChanged
currentChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QTabWidget.currentChanged; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QTabWidget::currentChanged(int index)
This signal is emitted whenever the current page index changes. The parameter is the new current page index position, or -1 if there isn't a new one (for example, if there are no widgets in the QTabWidget)
Note: Notifier signal for property currentIndex.
See also currentWidget() and currentIndex.
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#currentChanged
currentIndex
instance-attribute
currentIndex: int
Qt 5 reference:
currentIndex : int
This property holds the index position of the current tab page
The current index is -1 if there is no current widget.
By default, this property contains a value of -1 because there are initially no tabs in the widget.
Access functions:
| int | currentIndex() const |
|---|---|
| void | setCurrentIndex(int index) |
Notifier signal:
| void | currentChanged(int index) |
|---|---|
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#currentIndex
currentWidget
currentWidget() -> Any
X.currentWidget() -> PythonQt.QtGui.QWidget
Supplemental documentation: Qt 5 reference:
QWidget *QTabWidget::currentWidget() const
Returns a pointer to the page currently being displayed by the tab dialog. The tab dialog does its best to make sure that this value is never 0 (but if you try hard enough, it can be).
See also currentIndex() and setCurrentWidget().
Upstream PySide2 reference signatures (binding differences may apply):
currentWidget(self) -> PySide2.QtWidgets.QWidget
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#currentWidget
customContextMenuRequested
customContextMenuRequested(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QTabWidget.customContextMenuRequested; argument details are not documented.
destroyed
destroyed(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QTabWidget.destroyed; argument details are not documented.
documentMode
instance-attribute
documentMode: bool
Qt 5 reference:
documentMode : bool
This property holds whether or not the tab widget is rendered in a mode suitable for document pages. This is the same as document mode on macOS.
When this property is set the tab widget frame is not rendered. This mode is useful for showing document-type pages where the page covers most of the tab widget area.
This property was introduced in Qt 4.5.
Access functions:
| bool | documentMode() const |
|---|---|
| void | setDocumentMode(bool set) |
See also elideMode, QTabBar::documentMode, QTabBar::usesScrollButtons, and QStyle::SH_TabBar_PreferNoArrows.
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#documentMode
elideMode
instance-attribute
elideMode: Any
Qt 5 reference:
elideMode : Qt::TextElideMode
how to elide text in the tab bar
This property controls how items are elided when there is not enough space to show them for a given tab bar size.
By default the value is style dependent.
This property was introduced in Qt 4.2.
Access functions:
| Qt::TextElideMode | elideMode() const |
|---|---|
| void | setElideMode(Qt::TextElideMode mode) |
See also QTabBar::elideMode, usesScrollButtons, and QStyle::SH_TabBar_ElideMode.
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#elideMode
event
event(arg__1: Any) -> bool
X.event(arg__1) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual protected] bool QTabWidget::event(QEvent *ev)
Reimplements: QWidget::event(QEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
event(self, arg__1: PySide2.QtCore.QEvent) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#event
hasHeightForWidth
hasHeightForWidth() -> bool
X.hasHeightForWidth() -> bool
Supplemental documentation: Qt 5 reference:
[override virtual] bool QTabWidget::hasHeightForWidth() const
Reimplements: QWidget::hasHeightForWidth() const.
Upstream PySide2 reference signatures (binding differences may apply):
hasHeightForWidth(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#hasHeightForWidth
heightForWidth
heightForWidth(width: int) -> int
X.heightForWidth(width) -> int
Supplemental documentation: Qt 5 reference:
[override virtual] int QTabWidget::heightForWidth(int width) const
Reimplements: QWidget::heightForWidth(int w) const.
Upstream PySide2 reference signatures (binding differences may apply):
heightForWidth(self, width: int) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#heightForWidth
iconSize
instance-attribute
iconSize: QSize
Qt 5 reference:
iconSize : QSize
This property holds the size for icons in the tab bar
The default value is style-dependent. This is the maximum size that the icons will have. Icons are not scaled up if they are of smaller size.
This property was introduced in Qt 4.2.
Access functions:
| QSize | iconSize() const |
|---|---|
| void | setIconSize(const QSize \&size) |
See also QTabBar::iconSize.
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#iconSize
indexOf
indexOf(widget: Any) -> int
X.indexOf(widget) -> int
Supplemental documentation: Qt 5 reference:
int QTabWidget::indexOf(QWidget *w) const
Returns the index position of the page occupied by the widget w, or -1 if the widget cannot be found.
Upstream PySide2 reference signatures (binding differences may apply):
indexOf(self, widget: PySide2.QtWidgets.QWidget) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#indexOf
initStyleOption
initStyleOption(option: Any) -> None
X.initStyleOption(option)
Supplemental documentation: Qt 5 reference:
[protected] void QTabWidget::initStyleOption(QStyleOptionTabWidgetFrame *option) const
Initialize option with the values from this QTabWidget. This method is useful for subclasses when they need a QStyleOptionTabWidgetFrame, but don't want to fill in all the information themselves.
See also QStyleOption::initFrom() and QTabBar::initStyleOption().
Upstream PySide2 reference signatures (binding differences may apply):
initStyleOption(self, option: PySide2.QtWidgets.QStyleOptionTabWidgetFrame) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#initStyleOption
insertTab
insertTab(index: int, widget: Any, icon: Any, label: Any) -> int
X.insertTab(index, widget, icon, label) -> int
Supplemental documentation: Qt 5 reference:
int QTabWidget::insertTab(int index, QWidget *page, const QString \&label)
Inserts a tab with the given label and page into the tab widget at the specified index, and returns the index of the inserted tab in the tab bar. Ownership of page is passed on to the QTabWidget.
The label is displayed in the tab and may vary in appearance depending on the configuration of the tab widget.
If the tab's label contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g. if the label is "Bro\&wse" then Alt+W becomes a shortcut which will move the focus to this tab.
If index is out of range, the tab is simply appended. Otherwise it is inserted at the specified position.
If the QTabWidget was empty before this function is called, the new page becomes the current page. Inserting a new tab at an index less than or equal to the current index will increment the current index, but keep the current page.
Note: If you call insertTab() after show(), the layout system will try to adjust to the changes in its widgets hierarchy and may cause flicker. To prevent this, you can set the QWidget::updatesEnabled property to false prior to changes; remember to set the property to true when the changes are done, making the widget receive paint events again.
See also addTab().
int QTabWidget::insertTab(int index, QWidget *page, const QIcon \&icon, const QString \&label)
This is an overloaded function.
Inserts a tab with the given label, page, and icon into the tab widget at the specified index, and returns the index of the inserted tab in the tab bar. Ownership of page is passed on to the QTabWidget.
This function is the same as insertTab(), but with an additional icon.
Upstream PySide2 reference signatures (binding differences may apply):
insertTab(self, index: int, widget: PySide2.QtWidgets.QWidget, arg__3: str) -> int
insertTab(self, index: int, widget: PySide2.QtWidgets.QWidget, icon: PySide2.QtGui.QIcon, label: str) -> int
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#insertTab
isMovable
isMovable() -> bool
X.isMovable() -> bool
Upstream PySide2 reference signatures (binding differences may apply):
isMovable(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#isMovable
isTabEnabled
isTabEnabled(index: int) -> bool
X.isTabEnabled(index) -> bool
Supplemental documentation: Qt 5 reference:
bool QTabWidget::isTabEnabled(int index) const
Returns true if the page at position index is enabled; otherwise returns false.
See also setTabEnabled() and QWidget::isEnabled().
Upstream PySide2 reference signatures (binding differences may apply):
isTabEnabled(self, index: int) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#isTabEnabled
keyPressEvent
keyPressEvent(arg__1: Any) -> None
X.keyPressEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QTabWidget::keyPressEvent(QKeyEvent *e)
Reimplements: QWidget::keyPressEvent(QKeyEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
keyPressEvent(self, arg__1: PySide2.QtGui.QKeyEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#keyPressEvent
minimumSizeHint
instance-attribute
minimumSizeHint: QSize
Qt 5 reference:
[override virtual] QSize QTabWidget::minimumSizeHint() const
Reimplements an access function for property: QWidget::minimumSizeHint.
Returns a suitable minimum size for the tab widget.
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#minimumSizeHint
movable
instance-attribute
movable: Any
Qt 5 reference:
movable : bool
This property holds whether the user can move the tabs within the tabbar area.
By default, this property is false;
This property was introduced in Qt 4.5.
Access functions:
| bool | isMovable() const |
|---|---|
| void | setMovable(bool movable) |
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#movable
objectNameChanged
objectNameChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QTabWidget.objectNameChanged; argument details are not documented.
paintEvent
paintEvent(arg__1: Any) -> None
X.paintEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QTabWidget::paintEvent(QPaintEvent *event)
Reimplements: QWidget::paintEvent(QPaintEvent *event).
Paints the tab widget's tab bar in response to the paint event.
Upstream PySide2 reference signatures (binding differences may apply):
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#paintEvent
removeTab
removeTab(index: int) -> None
X.removeTab(index)
Supplemental documentation: Qt 5 reference:
void QTabWidget::removeTab(int index)
Removes the tab at position index from this stack of widgets. The page widget itself is not deleted.
See also addTab() and insertTab().
Upstream PySide2 reference signatures (binding differences may apply):
removeTab(self, index: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#removeTab
resizeEvent
resizeEvent(arg__1: Any) -> None
X.resizeEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QTabWidget::resizeEvent(QResizeEvent *e)
Reimplements: QWidget::resizeEvent(QResizeEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
resizeEvent(self, arg__1: PySide2.QtGui.QResizeEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#resizeEvent
setCornerWidget
setCornerWidget(w: Any, corner: Any) -> None
X.setCornerWidget(w, corner)
Supplemental documentation: Qt 5 reference:
void QTabWidget::setCornerWidget(QWidget *widget, Qt::Corner corner \= Qt::TopRightCorner)
Sets the given widget to be shown in the specified corner of the tab widget. The geometry of the widget is determined based on the widget's sizeHint() and the style().
Only the horizontal element of the corner will be used.
Passing nullptr shows no widget in the corner.
Any previously set corner widget is hidden.
All widgets set here will be deleted by the tab widget when it is destroyed unless you
separately reparent the widget after setting some other corner widget (or nullptr).
Note: Corner widgets are designed for North and South tab positions; other orientations are known to not work properly.
See also cornerWidget() and setTabPosition().
Upstream PySide2 reference signatures (binding differences may apply):
setCornerWidget(self, w: PySide2.QtWidgets.QWidget, corner: PySide2.QtCore.Qt.Corner=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#setCornerWidget
setCurrentIndex
setCurrentIndex(index: int) -> None
X.setCurrentIndex(index)
Upstream PySide2 reference signatures (binding differences may apply):
setCurrentIndex(self, index: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#setCurrentIndex
setCurrentWidget
setCurrentWidget(widget: Any) -> None
X.setCurrentWidget(widget)
Supplemental documentation: Qt 5 reference:
[slot] void QTabWidget::setCurrentWidget(QWidget *widget)
Makes widget the current widget. The widget used must be a page in this tab widget.
See also addTab(), setCurrentIndex(), and currentWidget().
Upstream PySide2 reference signatures (binding differences may apply):
setCurrentWidget(self, widget: PySide2.QtWidgets.QWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#setCurrentWidget
setDocumentMode
setDocumentMode(set: bool) -> None
X.setDocumentMode(set)
Upstream PySide2 reference signatures (binding differences may apply):
setDocumentMode(self, set: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#setDocumentMode
setElideMode
setElideMode(arg__1: Any) -> None
X.setElideMode(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
setElideMode(self, mode: PySide2.QtCore.Qt.TextElideMode) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#setElideMode
setIconSize
setIconSize(size: Any) -> None
X.setIconSize(size)
Upstream PySide2 reference signatures (binding differences may apply):
setIconSize(self, size: PySide2.QtCore.QSize) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtabwidget.html#setIconSize