QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QgsStackedWidget Class Reference

A QStackedWidget that can be shrunk to its current widget's size. More...

#include <qgsstackedwidget.h>

Inheritance diagram for QgsStackedWidget:
Inheritance graph
[legend]

Public Types

enum class  SizeMode { ConsiderAllPages , CurrentPageOnly }
 Possible modes for calculating a QgsStackedWidget's size. More...
 

Public Member Functions

 QgsStackedWidget (QWidget *parent=nullptr)
 Constructor for QgsStackedWidget.
 
QSize minimumSizeHint () const override
 
void setSizeMode (SizeMode mode)
 Sets the mode for this QgsStackedWidget.
 
QSize sizeHint () const override
 
SizeMode sizeMode () const
 Returns the SizeMode for this QgsStackedWidget.
 

Detailed Description

A QStackedWidget that can be shrunk to its current widget's size.

A regular QStackedWidget can be shrunk down the size of its largest page widget. A QgsStackedWidget can be set to only consider the current page widget's sizeHint and minimumSizeHint when resizing.

Since
QGIS 3.36

Definition at line 37 of file qgsstackedwidget.h.

Member Enumeration Documentation

◆ SizeMode

enum class QgsStackedWidget::SizeMode
strong

Possible modes for calculating a QgsStackedWidget's size.

Enumerator
ConsiderAllPages 

The sizes of all pages are considered when calculating the stacked widget size.

CurrentPageOnly 

Only the size of the current page is considered when calculating the stacked widget size.

Definition at line 46 of file qgsstackedwidget.h.

Constructor & Destructor Documentation

◆ QgsStackedWidget()

QgsStackedWidget::QgsStackedWidget ( QWidget *  parent = nullptr)
explicit

Constructor for QgsStackedWidget.

SizeMode defaults to Consider All Pages, same as QStackedWidget

Definition at line 22 of file qgsstackedwidget.cpp.

Member Function Documentation

◆ minimumSizeHint()

QSize QgsStackedWidget::minimumSizeHint ( ) const
override

Definition at line 40 of file qgsstackedwidget.cpp.

◆ setSizeMode()

void QgsStackedWidget::setSizeMode ( SizeMode  mode)
inline

Sets the mode for this QgsStackedWidget.

See QgsStackedWidget::SizeMode for interpretation

See also
sizeMode()

Definition at line 71 of file qgsstackedwidget.h.

◆ sizeHint()

QSize QgsStackedWidget::sizeHint ( ) const
override

Definition at line 28 of file qgsstackedwidget.cpp.

◆ sizeMode()

SizeMode QgsStackedWidget::sizeMode ( ) const
inline

Returns the SizeMode for this QgsStackedWidget.

See QgsStackedWidget::SizeMode for interpretation

See also
setSizeMode()

Definition at line 64 of file qgsstackedwidget.h.


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