QFocusFramewidget provides a focus frame which can be outside of a widget’s normal paintable area. 更多 …
def
initStyleOption
(option)
def
setWidget
(widget)
def
widget
()
Normally an application will not need to create its own
QFocusFrameasQStylewill handle this detail for you. A style writer can optionally use aQFocusFrameto 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 aQWidgetwithsetWidget. It is, however, legal to create your ownQFocusFrameon a custom widget and set its geometry manually viasetGeometry但不会自动放置,当聚焦 Widget 改变大小或放置时。
QFocusFrame
(
[
parent=None
]
)
¶
- param parent
构造
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.
另请参阅
PySide2.QtWidgets.QFocusFrame.
initStyleOption
(
option
)
¶
option
–
QStyleOption
初始化
option
采用值来自此
QFocusFrame
。此方法对子类是有用的,当需要
QStyleOption
, but don’t want to fill in all the information themselves.
另请参阅
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.
另请参阅
PySide2.QtWidgets.QFocusFrame.
widget
(
)
¶
返回自动重置尺寸和更新的当前监视 Widget。
另请参阅