PythonQt.QtGui.QDockWidget · declarations 001
Back to PythonQt.QtGui.QDockWidget
AllDockWidgetFeatures
instance-attribute
AllDockWidgetFeatures: Any
DockWidgetClosable
instance-attribute
DockWidgetClosable: Any
DockWidgetFeature
instance-attribute
DockWidgetFeature: 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
DockWidgetFeatureMask
instance-attribute
DockWidgetFeatureMask: Any
DockWidgetFeatures
instance-attribute
DockWidgetFeatures: 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
DockWidgetFloatable
instance-attribute
DockWidgetFloatable: Any
DockWidgetMovable
instance-attribute
DockWidgetMovable: Any
DockWidgetVerticalTitleBar
instance-attribute
DockWidgetVerticalTitleBar: Any
NoDockWidgetFeatures
instance-attribute
NoDockWidgetFeatures: Any
allowedAreas
instance-attribute
allowedAreas: Any
Qt 5 reference:
allowedAreas : Qt::DockWidgetAreas
areas where the dock widget may be placed
The default is Qt::AllDockWidgetAreas.
Access functions:
| Qt::DockWidgetAreas | allowedAreas() const |
|---|---|
| void | setAllowedAreas(Qt::DockWidgetAreas areas) |
Notifier signal:
| void | allowedAreasChanged(Qt::DockWidgetAreas allowedAreas) |
|---|---|
See also Qt::DockWidgetArea.
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#allowedAreas
allowedAreasChanged
allowedAreasChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.allowedAreasChanged; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QDockWidget::allowedAreasChanged(Qt::DockWidgetAreas allowedAreas)
This signal is emitted when the allowedAreas property changes. The allowedAreas parameter gives the new value of the property.
Note: Notifier signal for property allowedAreas.
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#allowedAreasChanged
changeEvent
changeEvent(event: Any) -> None
X.changeEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QDockWidget::changeEvent(QEvent *event)
Reimplements: QWidget::changeEvent(QEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
changeEvent(self, event: PySide2.QtCore.QEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#changeEvent
closeEvent
closeEvent(event: Any) -> None
X.closeEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QDockWidget::closeEvent(QCloseEvent *event)
Reimplements: QWidget::closeEvent(QCloseEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
closeEvent(self, event: PySide2.QtGui.QCloseEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#closeEvent
customContextMenuRequested
customContextMenuRequested(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.customContextMenuRequested; argument details are not documented.
destroyed
destroyed(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.destroyed; argument details are not documented.
dockLocationChanged
dockLocationChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.dockLocationChanged; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QDockWidget::dockLocationChanged(Qt::DockWidgetArea area)
This signal is emitted when the dock widget is moved to another dock area, or is moved to a different location in its current dock area. This happens when the dock widget is moved programmatically or is dragged to a new location by the user.
This function was introduced in Qt 4.3.
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#dockLocationChanged
event
event(event: Any) -> bool
X.event(event) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual protected] bool QDockWidget::event(QEvent *event)
Reimplements: QWidget::event(QEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
event(self, event: PySide2.QtCore.QEvent) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#event
features
instance-attribute
features: Any
Qt 5 reference:
features : DockWidgetFeatures
This property holds whether the dock widget is movable, closable, and floatable
By default, this property is set to a combination of DockWidgetClosable, DockWidgetMovable and DockWidgetFloatable.
Access functions:
| QDockWidget::DockWidgetFeatures | features() const |
|---|---|
| void | setFeatures(QDockWidget::DockWidgetFeatures features) |
Notifier signal:
| void | featuresChanged(QDockWidget::DockWidgetFeatures features) |
|---|---|
See also DockWidgetFeature.
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#features
featuresChanged
featuresChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.featuresChanged; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QDockWidget::featuresChanged(QDockWidget::DockWidgetFeatures features)
This signal is emitted when the features property changes. The features parameter gives the new value of the property.
Note: Notifier signal for property features.
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#featuresChanged
floating
instance-attribute
floating: Any
Qt 5 reference:
floating : bool
This property holds whether the dock widget is floating
A floating dock widget is presented to the user as an independent window "on top" of its parent QMainWindow, instead of being docked in the QMainWindow.
By default, this property is true.
When this property changes, the topLevelChanged() signal is emitted.
Access functions:
| bool | isFloating() const |
|---|---|
| void | setFloating(bool floating) |
See also isWindow() and topLevelChanged().
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#floating
initStyleOption
initStyleOption(option: Any) -> None
X.initStyleOption(option)
Supplemental documentation: Qt 5 reference:
[protected] void QDockWidget::initStyleOption(QStyleOptionDockWidget *option) const
Initialize option with the values from this QDockWidget. This method is useful for subclasses when they need a QStyleOptionDockWidget, but don't want to fill in all the information themselves.
See also QStyleOption::initFrom().
Upstream PySide2 reference signatures (binding differences may apply):
initStyleOption(self, option: PySide2.QtWidgets.QStyleOptionDockWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#initStyleOption
isAreaAllowed
isAreaAllowed(area: Any) -> bool
X.isAreaAllowed(area) -> bool
Supplemental documentation: Qt 5 reference:
bool QDockWidget::isAreaAllowed(Qt::DockWidgetArea area) const
Returns true if this dock widget can be placed in the given area; otherwise returns
false.
Upstream PySide2 reference signatures (binding differences may apply):
isAreaAllowed(self, area: PySide2.QtCore.Qt.DockWidgetArea) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#isAreaAllowed
isFloating
isFloating() -> bool
X.isFloating() -> bool
Upstream PySide2 reference signatures (binding differences may apply):
isFloating(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#isFloating
objectNameChanged
objectNameChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.objectNameChanged; argument details are not documented.
paintEvent
paintEvent(event: Any) -> None
X.paintEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QDockWidget::paintEvent(QPaintEvent *event)
Reimplements: QWidget::paintEvent(QPaintEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
paintEvent(self, event: PySide2.QtGui.QPaintEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#paintEvent
setAllowedAreas
setAllowedAreas(areas: Any) -> None
X.setAllowedAreas(areas)
Upstream PySide2 reference signatures (binding differences may apply):
setAllowedAreas(self, areas: PySide2.QtCore.Qt.DockWidgetAreas) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#setAllowedAreas
setFeatures
setFeatures(features: Any) -> None
X.setFeatures(features)
Upstream PySide2 reference signatures (binding differences may apply):
setFeatures(self, features: PySide2.QtWidgets.QDockWidget.DockWidgetFeatures) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#setFeatures
setFloating
setFloating(arg0: floating) -> None
X.setFloating(floating)
Upstream PySide2 reference signatures (binding differences may apply):
setFloating(self, floating: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#setFloating
setTitleBarWidget
setTitleBarWidget(widget: Any) -> None
X.setTitleBarWidget(widget)
Supplemental documentation: Qt 5 reference:
void QDockWidget::setTitleBarWidget(QWidget *widget)
Sets an arbitrary widget as the dock widget's title bar. If widget is nullptr, any
custom title bar widget previously set on the dock widget is removed, but not deleted,
and the default title bar will be used instead.
If a title bar widget is set, QDockWidget will not use native window decorations when it is floated.
Here are some tips for implementing custom title bars:
- Mouse events that are not explicitly handled by the title bar widget must be ignored by calling QMouseEvent::ignore(). These events then propagate to the QDockWidget parent, which handles them in the usual manner, moving when the title bar is dragged, docking and undocking when it is double-clicked, etc.
- When DockWidgetVerticalTitleBar is set on QDockWidget, the title bar widget is repositioned accordingly. In resizeEvent(), the title bar should check what orientation it should assume:
QDockWidget *dockWidget = qobject_cast<QDockWidget*>(parentWidget());
if (dockWidget->features() & QDockWidget::DockWidgetVerticalTitleBar) {
// I need to be vertical
} else {
// I need to be horizontal
}
Using qobject_cast() as shown above, the title bar widget has full access to its parent QDockWidget. Hence it can perform such operations as docking and hiding in response to user actions.
This function was introduced in Qt 4.3.
See also titleBarWidget() and DockWidgetVerticalTitleBar.
Upstream PySide2 reference signatures (binding differences may apply):
setTitleBarWidget(self, widget: PySide2.QtWidgets.QWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#setTitleBarWidget
setWidget
setWidget(widget: Any) -> None
X.setWidget(widget)
Supplemental documentation: Qt 5 reference:
void QDockWidget::setWidget(QWidget *widget)
Sets the widget for the dock widget to widget.
If the dock widget is visible when widget is added, you must show() it explicitly.
Note that you must add the layout of the widget before you call this function; if not, the widget will not be visible.
See also widget().
Upstream PySide2 reference signatures (binding differences may apply):
setWidget(self, widget: PySide2.QtWidgets.QWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#setWidget
titleBarWidget
titleBarWidget() -> Any
X.titleBarWidget() -> PythonQt.QtGui.QWidget
Supplemental documentation: Qt 5 reference:
QWidget *QDockWidget::titleBarWidget() const
Returns the custom title bar widget set on the
QDockWidget, or nullptr if no
custom title bar has been set.
This function was introduced in Qt 4.3.
See also setTitleBarWidget().
Upstream PySide2 reference signatures (binding differences may apply):
titleBarWidget(self) -> PySide2.QtWidgets.QWidget
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#titleBarWidget
toggleViewAction
toggleViewAction() -> Any
X.toggleViewAction() -> PythonQt.QtGui.QAction
Supplemental documentation: Qt 5 reference:
QAction *QDockWidget::toggleViewAction() const
Returns a checkable action that can be added to menus and toolbars so that the user can show or close this dock widget.
The action's text is set to the dock widget's window title.
Note: The action can not be used to programmatically show or hide the dock widget. Use the visible property for that.
See also QAction::text and QWidget::windowTitle.
Upstream PySide2 reference signatures (binding differences may apply):
toggleViewAction(self) -> PySide2.QtWidgets.QAction
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#toggleViewAction
topLevelChanged
topLevelChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.topLevelChanged; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QDockWidget::topLevelChanged(bool topLevel)
This signal is emitted when the floating property changes. The topLevel parameter is true if the dock widget is now floating; otherwise it is false.
See also isWindow().
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#topLevelChanged
visibilityChanged
visibilityChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.visibilityChanged; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QDockWidget::visibilityChanged(bool visible)
This signal is emitted when the dock widget becomes visible (or invisible). This happens when the widget is hidden or shown, as well as when it is docked in a tabbed dock area and its tab becomes selected or unselected.
This function was introduced in Qt 4.3.
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#visibilityChanged
widget
widget() -> Any
X.widget() -> PythonQt.QtGui.QWidget
Supplemental documentation: Qt 5 reference:
QWidget *QDockWidget::widget() const
Returns the widget for the dock widget. This function returns zero if the widget has not been set.
See also setWidget().
Upstream PySide2 reference signatures (binding differences may apply):
widget(self) -> PySide2.QtWidgets.QWidget
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#widget
windowIconChanged
windowIconChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.windowIconChanged; argument details are not documented.
windowIconTextChanged
windowIconTextChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.windowIconTextChanged; argument details are not documented.
windowTitle
instance-attribute
windowTitle: Any
Qt 5 reference:
windowTitle : QString
This property holds the dock widget title (caption)
By default, this property contains an empty string.
Access functions:
| QString | windowTitle() const |
|---|---|
| void | setWindowTitle(const QString \&) |
Notifier signal:
| void | windowTitleChanged(const QString \&title) |
|---|---|
Source: https://doc.qt.io/archives/qt-5.15/qdockwidget.html#windowTitle
windowTitleChanged
windowTitleChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QDockWidget.windowTitleChanged; argument details are not documented.