QFocusFrame¶
The
QFocusFramewidget provides a focus frame which can be outside of a widget’s normal paintable area. More…

Synopsis¶
Functions¶
def
initStyleOption(option)def
setWidget(widget)def
widget()
Detailed Description¶
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 viasetGeometryhowever you will not get auto-placement when the focused widget changes size or placement.
- class PySide2.QtWidgets.QFocusFrame([parent=None])¶
- param parent:
Constructs a
QFocusFrame.The focus frame will not monitor
parentfor updates but rather can be placed manually or by usingsetWidget. AQFocusFramesetsWA_NoChildEventsForParentattribute; as a result the parent will not receive aChildAddedevent, this will make it possible to manually set the geometry of theQFocusFrameinside of aQSplitteror other child event monitoring widget.See also
- PySide2.QtWidgets.QFocusFrame.initStyleOption(option)¶
- Parameters:
option –
PySide2.QtWidgets.QStyleOption
Initialize
optionwith the values from thisQFocusFrame. This method is useful for subclasses when they need aQStyleOption, but don’t want to fill in all the information themselves.See also
- PySide2.QtWidgets.QFocusFrame.setWidget(widget)¶
- Parameters:
widget –
PySide2.QtWidgets.QWidget
QFocusFramewill track changes towidgetand resize itself automatically. If the monitored widget’s parent changes,QFocusFramewill follow the widget and place itself around the widget automatically. If the monitored widget is deleted,QFocusFramewill set it to zero.See also
- PySide2.QtWidgets.QFocusFrame.widget()¶
- Return type:
Returns the currently monitored widget for automatically resize and update.
See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.