PySide6.QtWidgets.QFocusFrame¶
- class QFocusFrame¶
- The - QFocusFramewidget provides a focus frame which can be outside of a widget’s normal paintable area. More…- Synopsis¶- Methods¶- def - __init__()
- def - setWidget()
- def - widget()
 - Virtual methods¶- Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- Normally an application will not need to create its own - QFocusFrameas- QStylewill handle this detail for you. A style writer can optionally use a- QFocusFrameto 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- QWidgetwith- setWidget. It is, however, legal to create your own- QFocusFrameon a custom widget and set its geometry manually via- setGeometryhowever you will not get auto-placement when the focused widget changes size or placement.- Constructs a - QFocusFrame.- The focus frame will not monitor - parentfor updates but rather can be placed manually or by using- setWidget. A- QFocusFramesets Qt::WA_NoChildEventsForParent attribute; as a result the parent will not receive a QEvent::ChildAdded event, this will make it possible to manually set the geometry of the- QFocusFrameinside of a- QSplitteror other child event monitoring widget.- See also - initStyleOption(option)¶
- Parameters:
- option – - QStyleOption
 
 - Initialize - optionwith the values from this- QFocusFrame. This method is useful for subclasses when they need a- QStyleOption, but don’t want to fill in all the information themselves.- See also - QFocusFramewill track changes to- widgetand 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 - Returns the currently monitored widget for automatically resize and update. - See also