NDEVR
API Documentation
QCustomScrollArea

A scroll area is used to display the contents of a child widget within a frame. More...

Inheritance diagram for QCustomScrollArea:
[legend]

Public Member Functions

 QCustomScrollArea (QWidget *parent=nullptr)
 Constructs a custom scroll area widget.
bool eventFilter (QObject *, QEvent *event) override
 Filters events for the child widget to handle resize and layout updates.
void setUseFullScroll (bool use_full_scroll)
 Sets whether the scroll area uses full scroll mode, where the scroll area expands to accommodate the full content size in the size hint.
void setWidget (QWidget *w)
 Sets the scrollable child widget.
QSize sizeHint () const override
 Returns the recommended size for the scroll area.
QWidget * takeWidget ()
 Removes and returns the scrollable child widget without deleting it.
bool useFullScroll () const
 Returns whether full scroll mode is enabled.

Protected Attributes

bool m_use_full_scroll = false
 Whether the scroll area uses full scroll mode.

Detailed Description

A scroll area is used to display the contents of a child widget within a frame.


If the widget exceeds the size of the frame, the view can provide scroll bars so that the entire area of the child widget can be viewed.

Definition at line 14 of file QCustomScrollArea.h.

Constructor & Destructor Documentation

◆ QCustomScrollArea()

QCustomScrollArea::QCustomScrollArea ( QWidget * parent = nullptr)

Constructs a custom scroll area widget.

Parameters
[in]parentThe parent widget, or nullptr for no parent.

Member Function Documentation

◆ eventFilter()

bool QCustomScrollArea::eventFilter ( QObject * ,
QEvent * event )
override

Filters events for the child widget to handle resize and layout updates.

Parameters
[in]objectThe object that generated the event.
[in]eventThe event to filter.
Returns
True if the event was handled, false otherwise.

◆ setUseFullScroll()

void QCustomScrollArea::setUseFullScroll ( bool use_full_scroll)

Sets whether the scroll area uses full scroll mode, where the scroll area expands to accommodate the full content size in the size hint.

Parameters
[in]use_full_scrollWhether to enable full scroll mode.

◆ setWidget()

void QCustomScrollArea::setWidget ( QWidget * w)

Sets the scrollable child widget.

Parameters
[in]wThe widget to display inside the scroll area.

◆ sizeHint()

QSize QCustomScrollArea::sizeHint ( ) const
override

Returns the recommended size for the scroll area.

Returns
The recommended QSize for layout calculations.

◆ takeWidget()

QWidget * QCustomScrollArea::takeWidget ( )

Removes and returns the scrollable child widget without deleting it.

Returns
The previously set child widget, or nullptr if none was set.

◆ useFullScroll()

bool QCustomScrollArea::useFullScroll ( ) const
inline

Returns whether full scroll mode is enabled.

Returns
True if full scroll mode is active, false otherwise.

Definition at line 44 of file QCustomScrollArea.h.

References m_use_full_scroll.


The documentation for this class was generated from the following file: