ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
AdaptiveStackedWidget Class Reference

QStackedWidget that reports the current page's size hints. More...

#include <AdaptiveStackedWidget.hpp>

Inherits QStackedWidget.

Collaboration diagram for AdaptiveStackedWidget:
Collaboration graph

Public Member Functions

 AdaptiveStackedWidget (QWidget *parent=nullptr)
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 

Detailed Description

QStackedWidget that reports the current page's size hints.

The standard QStackedWidget::sizeHint() returns the maximum of all pages, which causes the containing dialog to be as tall as the largest form even when a compact form is shown. This subclass overrides sizeHint() and minimumSizeHint() to return the current page's values so that layouts and scroll areas can size themselves correctly.

Must be in the global namespace so uic generates unqualified class names.