A scroll area is used to display the contents of a child widget within a frame.
More...
|
| | 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.
|
|
|
bool | m_use_full_scroll = false |
| | Whether the scroll area uses full scroll mode.
|
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.
◆ QCustomScrollArea()
| QCustomScrollArea::QCustomScrollArea |
( |
QWidget * | parent = nullptr | ) |
|
Constructs a custom scroll area widget.
- Parameters
-
| [in] | parent | The parent widget, or nullptr for no parent. |
◆ eventFilter()
| bool QCustomScrollArea::eventFilter |
( |
QObject * | , |
|
|
QEvent * | event ) |
|
override |
Filters events for the child widget to handle resize and layout updates.
- Parameters
-
| [in] | object | The object that generated the event. |
| [in] | event | The 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_scroll | Whether to enable full scroll mode. |
◆ setWidget()
| void QCustomScrollArea::setWidget |
( |
QWidget * | w | ) |
|
Sets the scrollable child widget.
- Parameters
-
| [in] | w | The 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 |
The documentation for this class was generated from the following file: