内容表

上一话题

QFileSystemModel

下一话题

QFontComboBox

QFocusFrame

QFocusFrame widget provides a focus frame which can be outside of a widget’s normal paintable area. 更多

Inheritance diagram of PySide2.QtWidgets.QFocusFrame

概要

函数

详细描述

Normally an application will not need to create its own QFocusFrame as QStyle will handle this detail for you. A style writer can optionally use a QFocusFrame to have a focus area outside of the widget’s paintable geometry. In this way space need not be reserved for the widget to have focus but only set on a QWidget with setWidget . It is, however, legal to create your own QFocusFrame on a custom widget and set its geometry manually via setGeometry 但不会自动放置,当聚焦 Widget 改变大小或放置时。

class QFocusFrame ( [ parent=None ] )
param parent

QWidget

构造 QFocusFrame .

聚焦框架不会监控 parent for updates but rather can be placed manually or by using setWidget . A QFocusFrame sets WA_NoChildEventsForParent attribute; as a result the parent will not receive a ChildAdded event, this will make it possible to manually set the geometry of the QFocusFrame inside of a QSplitter or other child event monitoring widget.

另请参阅

setWidget()

PySide2.QtWidgets.QFocusFrame. initStyleOption ( option )
参数

option QStyleOption

初始化 option 采用值来自此 QFocusFrame 。此方法对子类是有用的,当需要 QStyleOption , but don’t want to fill in all the information themselves.

另请参阅

initFrom()

PySide2.QtWidgets.QFocusFrame. setWidget ( widget )
参数

widget QWidget

QFocusFrame will track changes to widget and resize itself automatically. If the monitored widget’s parent changes, QFocusFrame will follow the widget and place itself around the widget automatically. If the monitored widget is deleted, QFocusFrame will set it to zero.

另请参阅

widget()

PySide2.QtWidgets.QFocusFrame. widget ( )
返回类型

QWidget

返回自动重置尺寸和更新的当前监视 Widget。

另请参阅

setWidget()