1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QFOCUSFRAME_H
5#define QFOCUSFRAME_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qwidget.h>
9
10QT_BEGIN_NAMESPACE
11
12
13class QFocusFramePrivate;
14class QStyleOption;
15
16class Q_WIDGETS_EXPORT QFocusFrame : public QWidget
17{
18 Q_OBJECT
19public:
20 QFocusFrame(QWidget *parent = nullptr);
21 ~QFocusFrame();
22
23 void setWidget(QWidget *widget);
24 QWidget *widget() const;
25
26protected:
27 bool event(QEvent *e) override;
28
29 bool eventFilter(QObject *, QEvent *) override;
30 void paintEvent(QPaintEvent *) override;
31 virtual void initStyleOption(QStyleOption *option) const;
32
33private:
34 Q_DECLARE_PRIVATE(QFocusFrame)
35 Q_DISABLE_COPY(QFocusFrame)
36};
37
38QT_END_NAMESPACE
39
40#endif // QFOCUSFRAME_H
41

source code of qtbase/src/widgets/widgets/qfocusframe.h