10#include <private/qwidget_p.h>
19 bool showFrameAboveWidget;
23 frameParent =
nullptr;
25 showFrameAboveWidget =
false;
34 q->setParent(frameParent);
36 if (
q->parentWidget()->rect().intersects(
q->geometry())) {
37 if (showFrameAboveWidget)
40 q->stackUnder(widget);
54 q->initStyleOption(&
opt);
61 widget->
width()+(hmargin*2), widget->
height()+(vmargin*2));
62 if (
q->geometry() == geom)
70 q->setMask(
mask.region);
154 d->showFrameAboveWidget =
true;
156 d->showFrameAboveWidget =
false;
164 p->removeEventFilter(
this);
165 if (!
d->showFrameAboveWidget ||
p ==
d->frameParent)
167 p =
p->parentWidget();
172 d->widget->installEventFilter(
this);
175 if (
d->showFrameAboveWidget) {
182 bool isScrollArea =
false;
183 if (
p->isWindow() ||
p->inherits(
"QToolBar") || (isScrollArea =
p->inherits(
"QAbstractScrollArea"))) {
186 if (prev && isScrollArea)
187 d->frameParent = prev;
192 p =
p->parentWidget();
246 if (
o ==
d->widget) {
257 if (
d->showFrameAboveWidget) {
284 }
else if (
d->showFrameAboveWidget) {
327#include "moc_qfocusframe.cpp"
The QFocusFrame widget provides a focus frame which can be outside of a widget's normal paintable are...
QFocusFrame(QWidget *parent=nullptr)
Constructs a QFocusFrame.
~QFocusFrame()
Destructor.
QWidget * widget() const
Returns the currently monitored widget for automatically resize and update.
bool event(QEvent *e) override
\reimp
bool eventFilter(QObject *, QEvent *) override
\reimp
void paintEvent(QPaintEvent *) override
\reimp
void setWidget(QWidget *widget)
QFocusFrame will track changes to widget and resize itself automatically.
virtual void initStyleOption(QStyleOption *option) const
Initialize option with the values from this QFocusFrame.
void installEventFilter(QObject *filterObj)
Installs an event filter filterObj on this object.
The QPaintEvent class contains event parameters for paint events.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QRect adjusted(int x1, int y1, int x2, int y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
The QStyleHintReturnMask class provides style hints that return a QRegion.
The QStyleOption class stores the parameters used by QStyle functions.
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
@ SH_FocusFrame_AboveWidget
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
Returns the value of the given pixel metric.
Combined button and popup list for selecting options.
@ WA_TransparentForMouseEvents
@ WA_NoChildEventsForParent
GLfloat GLfloat GLfloat w
[0]
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLdouble GLdouble GLdouble GLdouble q
app setAttribute(Qt::AA_DontShowIconsInMenus)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent