|qmake:||QT += widgets|
|QFocusFrame(QWidget *parent = nullptr)|
|QWidget *||widget() const|
- 214 public functions inherited from QWidget
- 31 public functions inherited from QObject
- 14 public functions inherited from QPaintDevice
|void||initStyleOption(QStyleOption *option) const|
|virtual bool||event(QEvent *e) override|
|virtual bool||eventFilter(QObject *o, QEvent *e) override|
|virtual void||paintEvent(QPaintEvent *) override|
- 35 protected functions inherited from QWidget
- 9 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
Additional Inherited Members
- 59 properties inherited from QWidget
- 1 property inherited from QObject
- 19 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 3 signals inherited from QWidget
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 1 protected slot inherited from QWidget
- 2 protected variables inherited from QObject
- 1 protected type inherited from QPaintDevice
The 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 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 QFocusFrame::setWidget. It is, however, legal to create your own 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.
Member Function Documentation
QFocusFrame::QFocusFrame(QWidget *parent = nullptr)
Constructs a QFocusFrame.
The focus frame will not monitor parent for updates but rather can be placed manually or by using QFocusFrame::setWidget. A QFocusFrame sets 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 QFocusFrame inside of a QSplitter or other child event monitoring widget.
See also QFocusFrame::setWidget().
[override virtual protected] bool QFocusFrame::event(QEvent *e)
Reimplemented from QWidget::event().
Reimplemented from QObject::eventFilter().
[protected] void QFocusFrame::initStyleOption(QStyleOption *option) const
See also QStyleOption::initFrom().
Reimplemented from QWidget::paintEvent().
void QFocusFrame::setWidget(QWidget *widget)
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.
See also QFocusFrame::widget().
QWidget *QFocusFrame::widget() const
Returns the currently monitored widget for automatically resize and update.
See also QFocusFrame::setWidget().
© 2018 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.