PySide.QtGui.QFocusFrame widget provides a focus frame which can be outside of a widget's normal paintable area.
Normally an application will not need to create its own PySide.QtGui.QFocusFrame as PySide.QtGui.QStyle will handle this detail for you. A style writer can optionally use a PySide.QtGui.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 PySide.QtGui.QWidget with QFocusFrame::setWidget. It is, however, legal to create your own PySide.QtGui.QFocusFrame on a custom widget and set its geometry manually via QWidget::setGeometry however you will not get auto-placement when the focused widget changes size or placement.
| 参数: | parent – PySide.QtGui.QWidget |
|---|
聚焦框架不会监控 parent for updates but rather can be placed manually or by using QFocusFrame::setWidget. A PySide.QtGui.QFocusFrame sets Qt.WA_NoChildEventsForParent attribute; as a result the parent will not receive a QEvent.ChildInserted event, this will make it possible to manually set the geometry of the PySide.QtGui.QFocusFrame inside of a PySide.QtGui.QSplitter or other child event monitoring widget.
| 参数: | option – PySide.QtGui.QStyleOption |
|---|
初始化 option 采用值来自此 PySide.QtGui.QFocusFrame 。此方法对子类是有用的,当需要 PySide.QtGui.QStyleOption ,但不希望自己填充所有信息。
| 参数: | widget – PySide.QtGui.QWidget |
|---|
PySide.QtGui.QFocusFrame will track changes to widget and resize itself automatically. If the monitored widget's parent changes, PySide.QtGui.QFocusFrame will follow the widget and place itself around the widget automatically. If the monitored widget is deleted, PySide.QtGui.QFocusFrame will set it to zero.
另请参阅
| 返回类型: | PySide.QtGui.QWidget |
|---|
返回自动重置尺寸和更新的当前监视 Widget。