Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QSCROLLAREA_H
5#define QSCROLLAREA_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qabstractscrollarea.h>
9
11
13
15
16class Q_WIDGETS_EXPORT QScrollArea : public QAbstractScrollArea
17{
19 Q_PROPERTY(bool widgetResizable READ widgetResizable WRITE setWidgetResizable)
21
22public:
23 explicit QScrollArea(QWidget *parent = nullptr);
24 ~QScrollArea();
25
26 QWidget *widget() const;
28 QWidget *takeWidget();
29
30 bool widgetResizable() const;
31 void setWidgetResizable(bool resizable);
32
33 QSize sizeHint() const override;
34
35 bool focusNextPrevChild(bool next) override;
36
37 Qt::Alignment alignment() const;
38 void setAlignment(Qt::Alignment);
39
40 void ensureVisible(int x, int y, int xmargin = 50, int ymargin = 50);
41 void ensureWidgetVisible(QWidget *childWidget, int xmargin = 50, int ymargin = 50);
42
43protected:
44 QScrollArea(QScrollAreaPrivate &dd, QWidget *parent = nullptr);
45 bool event(QEvent *) override;
46 bool eventFilter(QObject *, QEvent *) override;
47 void resizeEvent(QResizeEvent *) override;
48 void scrollContentsBy(int dx, int dy) override;
49
50 QSize viewportSizeHint() const override;
51
53 Q_DECLARE_PRIVATE(QScrollArea)
54 Q_DISABLE_COPY(QScrollArea)
55};
56
58
59#endif // QSCROLLAREA_H
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qobject.h:103
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:548
The QScrollArea class provides a scrolling view onto another widget.
Definition qscrollarea.h:17
\inmodule QtCore
Definition qsize.h:25
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QOpenGLWidget * widget
[1]
uint alignment
short next
Definition keywords.cpp:445
Combined button and popup list for selecting options.
Definition qcompare.h:63
GLint GLint GLint GLint GLint x
[0]
GLint y
struct _cl_event * event
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define explicit
label setAlignment(Qt::AlignLeft|Qt::AlignTop)
[0]
scrollArea setWidget(imageLabel)