Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qscrollarea.h
Go to the documentation of this file.
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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QSCROLLAREA_H
6
#
define
QSCROLLAREA_H
7
8
#
include
<
QtWidgets
/
qtwidgetsglobal
.
h
>
9
#
include
<
QtWidgets
/
qabstractscrollarea
.
h
>
10
11
QT_REQUIRE_CONFIG
(
scrollarea
);
12
13
QT_BEGIN_NAMESPACE
14
15
class
QScrollAreaPrivate;
16
17
class
Q_WIDGETS_EXPORT
QScrollArea
:
public
QAbstractScrollArea
18
{
19
Q_OBJECT
20
Q_PROPERTY(
bool
widgetResizable READ widgetResizable WRITE setWidgetResizable)
21
Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
22
23
public
:
24
explicit
QScrollArea(QWidget *parent =
nullptr
);
25
~QScrollArea();
26
27
QWidget *widget()
const
;
28
void
setWidget(QWidget *widget);
29
QWidget *takeWidget();
30
31
bool
widgetResizable()
const
;
32
void
setWidgetResizable(
bool
resizable);
33
34
QSize sizeHint()
const
override;
35
36
bool
focusNextPrevChild(
bool
next) override;
37
38
Qt::Alignment alignment()
const
;
39
void
setAlignment(Qt::Alignment);
40
41
void
ensureVisible(
int
x,
int
y,
int
xmargin = 50,
int
ymargin = 50);
42
void
ensureWidgetVisible(QWidget *childWidget,
int
xmargin = 50,
int
ymargin = 50);
43
44
protected
:
45
QScrollArea(QScrollAreaPrivate &dd, QWidget *parent =
nullptr
);
46
bool
event(QEvent *) override;
47
bool
eventFilter(QObject *, QEvent *) override;
48
void
resizeEvent(QResizeEvent *) override;
49
void
scrollContentsBy(
int
dx,
int
dy) override;
50
51
QSize viewportSizeHint()
const
override;
52
53
private
:
54
Q_DECLARE_PRIVATE(QScrollArea)
55
Q_DISABLE_COPY(QScrollArea)
56
};
57
58
QT_END_NAMESPACE
59
60
#
endif
// QSCROLLAREA_H
QScrollArea
The QScrollArea class provides a scrolling view onto another widget.
Definition
qscrollarea.h:18
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(scrollarea)
qtbase
src
widgets
widgets
qscrollarea.h
Generated on
for Qt by
1.18.0