NDEVR
API Documentation
QCustomScrollArea.h
1#pragma once
2#include "DLLInfo.h"
3#include <QScrollArea>
4#include <QScrollBar>
5#include <QEvent>
6namespace NDEVR
7{
14 class NDEVR_WIDGETS_API QCustomScrollArea : public QScrollArea
15 {
16 public:
21 QCustomScrollArea(QWidget* parent = nullptr);
28 bool eventFilter(QObject*, QEvent* event) override;
33 void setWidget(QWidget* w);
39 void setUseFullScroll(bool use_full_scroll);
44 bool useFullScroll() const { return m_use_full_scroll; };
49 QWidget* takeWidget();
54 QSize sizeHint() const override;
55 protected:
56 bool m_use_full_scroll = false;
57 };
58}
QWidget * takeWidget()
Removes and returns the scrollable child widget without deleting it.
bool eventFilter(QObject *, QEvent *event) override
Filters events for the child widget to handle resize and layout updates.
QSize sizeHint() const override
Returns the recommended size for the scroll area.
QCustomScrollArea(QWidget *parent=nullptr)
Constructs a custom scroll area widget.
void setUseFullScroll(bool use_full_scroll)
Sets whether the scroll area uses full scroll mode, where the scroll area expands to accommodate the ...
void setWidget(QWidget *w)
Sets the scrollable child widget.
bool m_use_full_scroll
Whether the scroll area uses full scroll mode.
bool useFullScroll() const
Returns whether full scroll mode is enabled.
The primary namespace for the NDEVR SDK.