16class Q_WIDGETS_EXPORT
QScrollArea :
public QAbstractScrollArea
19 Q_PROPERTY(
bool widgetResizable READ widgetResizable WRITE setWidgetResizable)
20 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
23 explicit QScrollArea(QWidget *parent =
nullptr);
26 QWidget *widget()
const;
27 void setWidget(QWidget *widget);
28 QWidget *takeWidget();
30 bool widgetResizable()
const;
31 void setWidgetResizable(
bool resizable);
33 QSize sizeHint()
const override;
35 bool focusNextPrevChild(
bool next) override;
37 Qt::Alignment alignment()
const;
38 void setAlignment(Qt::Alignment);
40 void ensureVisible(
int x,
int y,
int xmargin = 50,
int ymargin = 50);
41 void ensureWidgetVisible(QWidget *childWidget,
int xmargin = 50,
int ymargin = 50);
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;
50 QSize viewportSizeHint()
const override;
53 Q_DECLARE_PRIVATE(QScrollArea)
54 Q_DISABLE_COPY(QScrollArea)