Subgroup: other
Class: QgsFloatingWidget¶
-
class
qgis.gui.
QgsFloatingWidget
¶ Bases:
PyQt5.QtWidgets.QWidget
A QWidget subclass for creating widgets which float outside of the normal Qt layout system. Floating widgets use an “anchor widget” to determine how they are anchored within their parent widget.
New in version 3.0: Methods
acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
adjustSize
anchorPoint
Returns the floating widget’s anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget’s parent is resized or moved. anchorWidget
Returns the widget that the floating widget is “anchored” tto. anchorWidgetPoint
Returns the anchor widget’s anchor point, which corresponds to the point on the anchor widget which the floating widget should “attach” to. autoFillBackground
backgroundRole
baseSize
blockSignals
changeEvent
childAt
childAt(self, int, int) -> QWidget childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
close
closeEvent
colorCount
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
create
createWindowContainer
cursor
customEvent
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
find
findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
frameGeometry
frameSize
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse
grabMouse(self, Union[QCursor, Qt.CursorShape]) grabShortcut
graphicsEffect
graphicsProxyWidget
hasFocus
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
inherits
initPainter
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layout
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move
move(self, int, int) moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
physicalDpiX
physicalDpiY
pos
previousInFocusChain
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. raise_
receivers
rect
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
render
render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren)) repaint
repaint(self, int, int, int, int) resize
resize(self, int, int) resizeEvent
restoreGeometry
saveGeometry
scroll
scroll(self, int, int, QRect) sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAnchorPoint
Sets the floating widget’s anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget’s parent is resized or moved. setAnchorWidget
Sets the widget to “anchor” the floating widget to. setAnchorWidgetPoint
Returns the anchor widget’s anchor point, which corresponds to the point on the anchor widget which the floating widget should “attach” to. setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize
setBaseSize(self, QSize) setContentsMargins
setContentsMargins(self, QMargins) setContextMenuPolicy
setCursor
setDisabled
setEnabled
setFixedHeight
setFixedSize
setFixedSize(self, int, int) setFixedWidth
setFocus
setFocus(self, Qt.FocusReason) setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setGeometry
setGeometry(self, int, int, int, int) setGraphicsEffect
setHidden
setInputMethodHints
setLayout
setLayoutDirection
setLocale
setMask
setMask(self, QRegion) setMaximumHeight
setMaximumSize
setMaximumSize(self, QSize) setMaximumWidth
setMinimumHeight
setMinimumSize
setMinimumSize(self, QSize) setMinimumWidth
setMouseTracking
setObjectName
setPalette
setParent
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) setProperty
setShortcutAutoRepeat
setShortcutEnabled
setSizeIncrement
setSizeIncrement(self, QSize) setSizePolicy
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) setStatusTip
setStyle
setStyleSheet
setTabOrder
setTabletTracking
setToolTip
setToolTipDuration
setUpdatesEnabled
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
show
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
tabletEvent
testAttribute
thread
timerEvent
toolTip
toolTipDuration
tr
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update
update(self, QRect) updateGeometry
updateMicroFocus
updatesEnabled
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
y
Attributes
BottomLeft
BottomMiddle
BottomRight
DrawChildren
DrawWindowBackground
IgnoreMask
Middle
MiddleLeft
MiddleRight
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
TopLeft
TopMiddle
TopRight
anchorPointChanged
Emitted when the anchor point changes [signal] anchorWidgetChanged
Emitted when the anchor widget changes [signal] anchorWidgetPointChanged
Emitted when the anchor widget point changes [signal] customContextMenuRequested
customContextMenuRequested(self, QPoint) [signal] destroyed
destroyed(self, QObject = None) [signal] objectNameChanged
objectNameChanged(self, str) [signal] staticMetaObject
windowIconChanged
windowIconChanged(self, QIcon) [signal] windowIconTextChanged
windowIconTextChanged(self, str) [signal] windowTitleChanged
windowTitleChanged(self, str) [signal] -
class
AnchorPoint
¶ Bases:
int
-
BottomLeft
= 6¶
-
BottomMiddle
= 7¶
-
BottomRight
= 8¶
-
Middle
= 4¶
-
MiddleLeft
= 3¶
-
MiddleRight
= 5¶
-
TopLeft
= 0¶
-
TopMiddle
= 1¶
-
TopRight
= 2¶
-
actionEvent
()¶
-
anchorPoint
(self) → QgsFloatingWidget.AnchorPoint¶ Returns the floating widget’s anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget’s parent is resized or moved.
See also
-
anchorPointChanged
¶ Emitted when the anchor point changes [signal]
-
anchorWidget
(self) → QWidget¶ Returns the widget that the floating widget is “anchored” tto. The floating widget will be repositioned whenever the anchor widget moves or is resized so that it maintains the same relative position to the anchor widget.
See also
-
anchorWidgetChanged
¶ Emitted when the anchor widget changes [signal]
-
anchorWidgetPoint
(self) → QgsFloatingWidget.AnchorPoint¶ Returns the anchor widget’s anchor point, which corresponds to the point on the anchor widget which the floating widget should “attach” to. The floating widget should remain fixed in the same relative position to this anchor widget whenever the widget’s parent is resized or moved.
See also
-
anchorWidgetPointChanged
¶ Emitted when the anchor widget point changes [signal]
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
(self, e: QPaintEvent)¶
-
receivers
()¶
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAnchorPoint
(self, point: QgsFloatingWidget.AnchorPoint)¶ Sets the floating widget’s anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget’s parent is resized or moved.
Parameters: point – anchor point See also
-
setAnchorWidget
(self, widget: QWidget)¶ Sets the widget to “anchor” the floating widget to. The floating widget will be repositioned whenever the anchor widget moves or is resized so that it maintains the same relative position to the anchor widget.
Parameters: widget – anchor widget. Both the floating widget and the anchor widget must share some common parent. See also
-
setAnchorWidgetPoint
(self, point: QgsFloatingWidget.AnchorPoint)¶ Returns the anchor widget’s anchor point, which corresponds to the point on the anchor widget which the floating widget should “attach” to. The floating widget should remain fixed in the same relative position to this anchor widget whenever the widget’s parent is resized or moved.
See also
-
showEvent
(self, e: QShowEvent)¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-
class