PythonQt.QtGui.QWidget · declarations 005
Back to PythonQt.QtGui.QWidget
setBackgroundRole
setBackgroundRole(arg__1: Any) -> None
X.setBackgroundRole(arg__1)
Supplemental documentation: Qt 5 reference:
void QWidget::setBackgroundRole(QPalette::ColorRole role)
Sets the background role of the widget to role.
The background role defines the brush from the widget's palette that is used to render the background.
If role is QPalette::NoRole, then the widget inherits its parent's background role.
Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don't achieve the result you want with setBackgroundRole().
See also backgroundRole() and foregroundRole().
Upstream PySide2 reference signatures (binding differences may apply):
setBackgroundRole(self, arg__1: PySide2.QtGui.QPalette.ColorRole) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setBackgroundRole
setBaseSize
setBaseSize(basew: Any, baseh: Any) -> None
X.setBaseSize(basew, baseh)
Supplemental documentation: Qt 5 reference:
void QWidget::setBaseSize(int basew, int baseh)
This is an overloaded function.
This corresponds to setBaseSize(QSize(basew, baseh)). Sets the widgets base size to width basew and height baseh.
Note: Setter function for property baseSize.
Upstream PySide2 reference signatures (binding differences may apply):
setBaseSize(self, arg__1: PySide2.QtCore.QSize) -> None
setBaseSize(self, basew: int, baseh: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setBaseSize
setContentsMargins
setContentsMargins(left: Any, top: Any, right: Any, bottom: Any) -> None
X.setContentsMargins(left, top, right, bottom)
Supplemental documentation: Qt 5 reference:
void QWidget::setContentsMargins(int left, int top, int right, int bottom)
Sets the margins around the contents of the widget to have the sizes left, top, right, and bottom. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g. excluding the frame).
Changing the margins will trigger a resizeEvent().
See also contentsRect() and contentsMargins().
void QWidget::setContentsMargins(const QMargins \&margins)
This is an overloaded function.
The setContentsMargins function sets the margins around the widget's contents.
Sets the margins around the contents of the widget to have the sizes determined by margins. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g. excluding the frame).
Changing the margins will trigger a resizeEvent().
This function was introduced in Qt 4.6.
See also contentsRect() and contentsMargins().
Upstream PySide2 reference signatures (binding differences may apply):
setContentsMargins(self, left: int, top: int, right: int, bottom: int) -> None
setContentsMargins(self, margins: PySide2.QtCore.QMargins) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setContentsMargins
setContextMenuPolicy
setContextMenuPolicy(policy: Any) -> None
X.setContextMenuPolicy(policy)
Upstream PySide2 reference signatures (binding differences may apply):
setContextMenuPolicy(self, policy: PySide2.QtCore.Qt.ContextMenuPolicy) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setContextMenuPolicy
setCursor
setCursor(arg__1: Any) -> None
X.setCursor(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
setCursor(self, arg__1: PySide2.QtGui.QCursor) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setCursor
setDisabled
setDisabled(a: Any) -> None
X.setDisabled(a)
Supplemental documentation: Qt 5 reference:
[slot] void QWidget::setDisabled(bool disable)
Disables widget input events if disable is true; otherwise enables input events.
See the enabled documentation for more information.
See also isEnabledTo(), QKeyEvent, QMouseEvent, and changeEvent().
Upstream PySide2 reference signatures (binding differences may apply):
setDisabled(self, arg__1: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setDisabled
setEnabled
setEnabled(a: Any) -> None
X.setEnabled(a)
Upstream PySide2 reference signatures (binding differences may apply):
setEnabled(self, arg__1: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setEnabled
setFixedHeight
setFixedHeight(h: int) -> None
X.setFixedHeight(h)
Supplemental documentation: Qt 5 reference:
void QWidget::setFixedHeight(int h)
Sets both the minimum and maximum heights of the widget to h without changing the widths. Provided for convenience.
See also sizeHint(), minimumSize(), maximumSize(), and setFixedSize().
Upstream PySide2 reference signatures (binding differences may apply):
setFixedHeight(self, h: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setFixedHeight
setFixedSize
setFixedSize(w: Any, h: Any) -> None
X.setFixedSize(w, h)
Supplemental documentation: Qt 5 reference:
void QWidget::setFixedSize(const QSize \&s)
Sets both the minimum and maximum sizes of the widget to s, thereby preventing it from ever growing or shrinking.
This will override the default size constraints set by QLayout.
To remove constraints, set the size to QWIDGETSIZE_MAX.
Alternatively, if you want the widget to have a fixed size based on its contents, you can call QLayout::setSizeConstraint(QLayout::SetFixedSize);
See also maximumSize and minimumSize.
void QWidget::setFixedSize(int w, int h)
This is an overloaded function.
Sets the width of the widget to w and the height to h.
Upstream PySide2 reference signatures (binding differences may apply):
setFixedSize(self, arg__1: PySide2.QtCore.QSize) -> None
setFixedSize(self, w: int, h: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setFixedSize
setFixedWidth
setFixedWidth(w: int) -> None
X.setFixedWidth(w)
Supplemental documentation: Qt 5 reference:
void QWidget::setFixedWidth(int w)
Sets both the minimum and maximum width of the widget to w without changing the heights. Provided for convenience.
See also sizeHint(), minimumSize(), maximumSize(), and setFixedSize().
Upstream PySide2 reference signatures (binding differences may apply):
setFixedWidth(self, w: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setFixedWidth
setFocus
setFocus(reason: Any) -> None
X.setFocus(reason)
Supplemental documentation: Qt 5 reference:
[slot] void QWidget::setFocus()
This is an overloaded function.
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window.
void QWidget::setFocus(Qt::FocusReason reason)
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window. The reason argument will be passed into any focus event sent from this function, it is used to give an explanation of what caused the widget to get focus. If the window is not active, the widget will be given the focus when the window becomes active.
First, a focus about to change event is sent to the focus widget (if any) to tell it that it is about to lose the focus. Then focus is changed, a focus out event is sent to the previous focus item and a focus in event is sent to the new item to tell it that it just received the focus. (Nothing happens if the focus in and focus out widgets are the same.)
Note: On embedded platforms, setFocus() will not cause an input panel to be opened by the input method. If you want this to happen, you have to send a QEvent::RequestSoftwareInputPanel event to the widget yourself.
setFocus() gives focus to a widget regardless of its focus policy, but does not clear any keyboard grab (see grabKeyboard()).
Be aware that if the widget is hidden, it will not accept focus until it is shown.
Warning: If you call setFocus() in a function which may itself be called from focusOutEvent() or focusInEvent(), you may get an infinite recursion.
See also hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(), setFocusPolicy(), focusWidget(), QApplication::focusWidget(), grabKeyboard(), grabMouse(), Keyboard Focus in Widgets, and QEvent::RequestSoftwareInputPanel.
Upstream PySide2 reference signatures (binding differences may apply):
setFocus(self) -> None
setFocus(self, reason: PySide2.QtCore.Qt.FocusReason) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setFocus
setFocusPolicy
setFocusPolicy(policy: Any) -> None
X.setFocusPolicy(policy)
Upstream PySide2 reference signatures (binding differences may apply):
setFocusPolicy(self, policy: PySide2.QtCore.Qt.FocusPolicy) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setFocusPolicy
setFocusProxy
setFocusProxy(arg__1: Any) -> None
X.setFocusProxy(arg__1)
Supplemental documentation: Qt 5 reference:
void QWidget::setFocusProxy(QWidget *w)
Sets the widget's focus proxy to widget w. If w is nullptr, the function resets
this widget to have no focus proxy.
Some widgets can "have focus", but create a child widget, such as QLineEdit, to actually handle the focus. In this case, the widget can set the line edit to be its focus proxy.
setFocusProxy() sets the widget which will actually get focus when "this widget" gets it. If there is a focus proxy, setFocus() and hasFocus() operate on the focus proxy. If "this widget" is the focus widget, then setFocusProxy() moves focus to the new focus proxy.
See also focusProxy().
Upstream PySide2 reference signatures (binding differences may apply):
setFocusProxy(self, arg__1: PySide2.QtWidgets.QWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setFocusProxy
setFont
setFont(arg__1: Any) -> None
X.setFont(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
setFont(self, arg__1: PySide2.QtGui.QFont) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setFont
setForegroundRole
setForegroundRole(arg__1: Any) -> None
X.setForegroundRole(arg__1)
Supplemental documentation: Qt 5 reference:
void QWidget::setForegroundRole(QPalette::ColorRole role)
Sets the foreground role of the widget to role.
The foreground role defines the color from the widget's palette that is used to draw the foreground.
If role is QPalette::NoRole, the widget uses a foreground role that contrasts with the background role.
Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don't achieve the result you want with setForegroundRole().
See also foregroundRole() and backgroundRole().
Upstream PySide2 reference signatures (binding differences may apply):
setForegroundRole(self, arg__1: PySide2.QtGui.QPalette.ColorRole) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setForegroundRole
setGeometry
setGeometry(x: Any, y: Any, w: Any, h: Any) -> None
X.setGeometry(x, y, w, h)
Supplemental documentation: Qt 5 reference:
void QWidget::setGeometry(int x, int y, int w, int h)
This is an overloaded function.
This corresponds to setGeometry(QRect(x, y, w, h)).
Note: Setter function for property geometry.
Upstream PySide2 reference signatures (binding differences may apply):
setGeometry(self, arg__1: PySide2.QtCore.QRect) -> None
setGeometry(self, x: int, y: int, w: int, h: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setGeometry
setGraphicsEffect
setGraphicsEffect(effect: Any) -> None
X.setGraphicsEffect(effect)
Supplemental documentation: Qt 5 reference:
void QWidget::setGraphicsEffect(QGraphicsEffect *effect)
The setGraphicsEffect function is for setting the widget's graphics effect.
Sets effect as the widget's effect. If there already is an effect installed on this widget, QWidget will delete the existing effect before installing the new effect.
If effect is the installed effect on a different widget, setGraphicsEffect() will remove the effect from the widget and install it on this widget.
QWidget takes ownership of effect.
Note: This function will apply the effect on itself and all its children.
Note: Graphics effects are not supported for OpenGL-based widgets, such as QGLWidget, QOpenGLWidget and QQuickWidget.
This function was introduced in Qt 4.6.
See also graphicsEffect().
Upstream PySide2 reference signatures (binding differences may apply):
setGraphicsEffect(self, effect: PySide2.QtWidgets.QGraphicsEffect) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setGraphicsEffect
setHidden
setHidden(hidden: bool) -> None
X.setHidden(hidden)
Supplemental documentation: Qt 5 reference:
[slot] void QWidget::setHidden(bool hidden)
Convenience function, equivalent to setVisible(!hidden).
See also isHidden().
Upstream PySide2 reference signatures (binding differences may apply):
setHidden(self, hidden: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setHidden
setInputMethodHints
setInputMethodHints(hints: Any) -> None
X.setInputMethodHints(hints)
Upstream PySide2 reference signatures (binding differences may apply):
setInputMethodHints(self, hints: PySide2.QtCore.Qt.InputMethodHints) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setInputMethodHints
setLayout
setLayout(arg__1: Any) -> None
X.setLayout(arg__1)
Supplemental documentation: Qt 5 reference:
void QWidget::setLayout(QLayout *layout)
Sets the layout manager for this widget to layout.
If there already is a layout manager installed on this widget, QWidget won't let you install another. You must first delete the existing layout manager (returned by layout()) before you can call setLayout() with the new layout.
If layout is the layout manager on a different widget, setLayout() will reparent the layout and make it the layout manager for this widget.
Example:
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(formWidget);
setLayout(layout);
An alternative to calling this function is to pass this widget to the layout's constructor.
The QWidget will take ownership of layout.
See also layout() and Layout Management.
Upstream PySide2 reference signatures (binding differences may apply):
setLayout(self, arg__1: PySide2.QtWidgets.QLayout) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setLayout
setLayoutDirection
setLayoutDirection(direction: Any) -> None
X.setLayoutDirection(direction)
Upstream PySide2 reference signatures (binding differences may apply):
setLayoutDirection(self, direction: PySide2.QtCore.Qt.LayoutDirection) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setLayoutDirection
setLocale
setLocale(locale: Any) -> None
X.setLocale(locale)
Upstream PySide2 reference signatures (binding differences may apply):
setLocale(self, locale: PySide2.QtCore.QLocale) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setLocale
setMask
setMask(arg__1: Any) -> None
X.setMask(arg__1)
Supplemental documentation: Qt 5 reference:
void QWidget::setMask(const QBitmap \&bitmap)
Causes only the pixels of the widget for which bitmap has a corresponding 1 bit to be visible. If the region includes pixels outside the rect() of the widget, window system controls in that area may or may not be visible, depending on the platform.
Note that this effect can be slow if the region is particularly complex.
The following code shows how an image with an alpha channel can be used to generate a mask for a widget:
QLabel topLevelLabel;
QPixmap pixmap(":/images/tux.png");
topLevelLabel.setPixmap(pixmap);
topLevelLabel.setMask(pixmap.mask());
The label shown by this code is masked using the image it contains, giving the appearance that an irregularly-shaped image is being drawn directly onto the screen.
Masked widgets receive mouse events only on their visible portions.
See also mask(), clearMask(), windowOpacity(), and Shaped Clock Example.
void QWidget::setMask(const QRegion \®ion)
This is an overloaded function.
Causes only the parts of the widget which overlap region to be visible. If the region includes pixels outside the rect() of the widget, window system controls in that area may or may not be visible, depending on the platform.
Note that this effect can be slow if the region is particularly complex.
See also windowOpacity.
Upstream PySide2 reference signatures (binding differences may apply):
setMask(self, arg__1: PySide2.QtGui.QBitmap) -> None
setMask(self, arg__1: PySide2.QtGui.QRegion) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setMask
setMaximumHeight
setMaximumHeight(maxh: int) -> None
X.setMaximumHeight(maxh)
Upstream PySide2 reference signatures (binding differences may apply):
setMaximumHeight(self, maxh: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setMaximumHeight
setMaximumSize
setMaximumSize(maxw: Any, maxh: Any) -> None
X.setMaximumSize(maxw, maxh)
Supplemental documentation: Qt 5 reference:
void QWidget::setMaximumSize(int maxw, int maxh)
This is an overloaded function.
This function corresponds to setMaximumSize(QSize(maxw, maxh)). Sets the maximum width to maxw and the maximum height to maxh.
Note: Setter function for property maximumSize.
Upstream PySide2 reference signatures (binding differences may apply):
setMaximumSize(self, arg__1: PySide2.QtCore.QSize) -> None
setMaximumSize(self, maxw: int, maxh: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setMaximumSize
setMaximumWidth
setMaximumWidth(maxw: int) -> None
X.setMaximumWidth(maxw)
Upstream PySide2 reference signatures (binding differences may apply):
setMaximumWidth(self, maxw: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setMaximumWidth
setMinimumHeight
setMinimumHeight(minh: int) -> None
X.setMinimumHeight(minh)
Upstream PySide2 reference signatures (binding differences may apply):
setMinimumHeight(self, minh: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setMinimumHeight
setMinimumSize
setMinimumSize(minw: Any, minh: Any) -> None
X.setMinimumSize(minw, minh)
Supplemental documentation: Qt 5 reference:
void QWidget::setMinimumSize(int minw, int minh)
This is an overloaded function.
This function corresponds to setMinimumSize(QSize(minw, minh)). Sets the minimum width to minw and the minimum height to minh.
Note: Setter function for property minimumSize.
Upstream PySide2 reference signatures (binding differences may apply):
setMinimumSize(self, arg__1: PySide2.QtCore.QSize) -> None
setMinimumSize(self, minw: int, minh: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setMinimumSize
setMinimumWidth
setMinimumWidth(minw: int) -> None
X.setMinimumWidth(minw)
Upstream PySide2 reference signatures (binding differences may apply):
setMinimumWidth(self, minw: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setMinimumWidth
setMouseTracking
setMouseTracking(enable: bool) -> None
X.setMouseTracking(enable)
Upstream PySide2 reference signatures (binding differences may apply):
setMouseTracking(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setMouseTracking
setPalette
setPalette(arg__1: Any) -> None
X.setPalette(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
setPalette(self, arg__1: PySide2.QtGui.QPalette) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setPalette
setParent
setParent(parent: Any, f: Any) -> None
X.setParent(parent, f)
Supplemental documentation: Qt 5 reference:
void QWidget::setParent(QWidget *parent)
Sets the parent of the widget to parent, and resets the window flags. The widget is moved to position (0, 0) in its new parent.
If the new parent widget is in a different window, the reparented widget and its children are appended to the end of the tab chain of the new parent widget, in the same internal order as before. If one of the moved widgets had keyboard focus, setParent() calls clearFocus() for that widget.
If the new parent widget is in the same window as the old parent, setting the parent doesn't change the tab order or keyboard focus.
If the "new" parent widget is the old parent widget, this function does nothing.
Note: The widget becomes invisible as part of changing its parent, even if it was previously visible. You must call show() to make the widget visible again.
Warning: It is very unlikely that you will ever need this function. If you have a widget that changes its content dynamically, it is far easier to use QStackedWidget.
See also setWindowFlags().
void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
This is an overloaded function.
This function also takes widget flags, f as an argument.
Upstream PySide2 reference signatures (binding differences may apply):
setParent(self, parent: PySide2.QtCore.QObject) -> None
setParent(self, parent: PySide2.QtWidgets.QWidget) -> None
setParent(self, parent: PySide2.QtWidgets.QWidget, f: PySide2.QtCore.Qt.WindowFlags) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setParent
setShortcutAutoRepeat
setShortcutAutoRepeat(id: int, enable: bool) -> None
X.setShortcutAutoRepeat(id, enable)
Supplemental documentation: Qt 5 reference:
void QWidget::setShortcutAutoRepeat(int id, bool enable \= true)
If enable is true, auto repeat of the shortcut with the given id is enabled; otherwise it is disabled.
This function was introduced in Qt 4.2.
See also grabShortcut() and releaseShortcut().
Upstream PySide2 reference signatures (binding differences may apply):
setShortcutAutoRepeat(self, id: int, enable: bool=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setShortcutAutoRepeat
setShortcutEnabled
setShortcutEnabled(id: int, enable: bool) -> None
X.setShortcutEnabled(id, enable)
Supplemental documentation: Qt 5 reference:
void QWidget::setShortcutEnabled(int id, bool enable \= true)
If enable is true, the shortcut with the given id is enabled; otherwise the shortcut is disabled.
Warning: You should not normally need to use this function since Qt's shortcut system enables/disables shortcuts automatically as widgets become hidden/visible and gain or lose focus. It is best to use QAction or QShortcut to handle shortcuts, since they are easier to use than this low-level function.
See also grabShortcut() and releaseShortcut().
Upstream PySide2 reference signatures (binding differences may apply):
setShortcutEnabled(self, id: int, enable: bool=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setShortcutEnabled
setSizeIncrement
setSizeIncrement(w: Any, h: Any) -> None
X.setSizeIncrement(w, h)
Supplemental documentation: Qt 5 reference:
void QWidget::setSizeIncrement(int w, int h)
This is an overloaded function.
Sets the x (width) size increment to w and the y (height) size increment to h.
Note: Setter function for property sizeIncrement.
Upstream PySide2 reference signatures (binding differences may apply):
setSizeIncrement(self, arg__1: PySide2.QtCore.QSize) -> None
setSizeIncrement(self, w: int, h: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setSizeIncrement
setSizePolicy
setSizePolicy(horizontal: Any, vertical: Any) -> None
X.setSizePolicy(horizontal, vertical)
Supplemental documentation: Qt 5 reference:
void QWidget::setSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)
This is an overloaded function.
Sets the size policy of the widget to horizontal and vertical, with standard stretch and no height-for-width.
Note: Setter function for property sizePolicy.
See also QSizePolicy::QSizePolicy().
Upstream PySide2 reference signatures (binding differences may apply):
setSizePolicy(self, arg__1: PySide2.QtWidgets.QSizePolicy) -> None
setSizePolicy(self, horizontal: PySide2.QtWidgets.QSizePolicy.Policy, vertical: PySide2.QtWidgets.QSizePolicy.Policy) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setSizePolicy
setStatusTip
setStatusTip(arg__1: str) -> None
X.setStatusTip(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
setStatusTip(self, arg__1: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setStatusTip
setStyle
setStyle(arg__1: Any) -> None
X.setStyle(arg__1)
Supplemental documentation: Qt 5 reference:
void QWidget::setStyle(QStyle *style)
Sets the widget's GUI style to style. The ownership of the style object is not transferred.
If no style is set, the widget uses the application's style, QApplication::style() instead.
Setting a widget's style has no effect on existing or future child widgets.
Warning: This function is particularly useful for demonstration purposes, where you want to show Qt's styling capabilities. Real applications should avoid it and use one consistent GUI style instead.
Warning: Qt style sheets are currently not supported for custom QStyle subclasses. We plan to address this in some future release.
See also style(), QStyle, QApplication::style(), and QApplication::setStyle().
Upstream PySide2 reference signatures (binding differences may apply):
setStyle(self, arg__1: PySide2.QtWidgets.QStyle) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setStyle
setStyleSheet
setStyleSheet(styleSheet: str) -> None
X.setStyleSheet(styleSheet)
Upstream PySide2 reference signatures (binding differences may apply):
setStyleSheet(self, styleSheet: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setStyleSheet
setTabOrder
setTabOrder(arg__1: Any, arg__2: Any) -> None
X.setTabOrder(arg__1, arg__2)
Supplemental documentation: Qt 5 reference:
[static] void QWidget::setTabOrder(QWidget *first, QWidget *second)
Puts the second widget after the first widget in the focus order.
It effectively removes the second widget from its focus chain and inserts it after the first widget.
Note that since the tab order of the second widget is changed, you should order a chain like this:
setTabOrder(a, b); // a to b
setTabOrder(b, c); // a to b to c
setTabOrder(c, d); // a to b to c to d
not like this:
// WRONG
setTabOrder(c, d); // c to d
setTabOrder(a, b); // a to b AND c to d
setTabOrder(b, c); // a to b to c, but not c to d
If first or second has a focus proxy, setTabOrder() correctly substitutes the proxy.
Note: Since Qt 5.10: A widget that has a child as focus proxy is understood as a compound widget. When setting a tab order between one or two compound widgets, the local tab order inside each will be preserved. This means that if both widgets are compound widgets, the resulting tab order will be from the last child inside first, to the first child inside second.
See also setFocusPolicy(), setFocusProxy(), and Keyboard Focus in Widgets.
Upstream PySide2 reference signatures (binding differences may apply):
setTabOrder(arg__1: PySide2.QtWidgets.QWidget, arg__2: PySide2.QtWidgets.QWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qwidget.html#setTabOrder