constructor code improved
This commit is contained in:
parent
df3a306fb0
commit
0fea82dfff
@ -5,12 +5,13 @@
|
|||||||
|
|
||||||
#include "QskResizable.h"
|
#include "QskResizable.h"
|
||||||
|
|
||||||
|
// QGridLayoutEngine internally uses FLT_MAX
|
||||||
|
static constexpr qreal c_max = std::numeric_limits< float >::max();
|
||||||
|
|
||||||
QskResizable::QskResizable():
|
QskResizable::QskResizable():
|
||||||
m_sizePolicy( QskSizePolicy::Preferred, QskSizePolicy::Preferred )
|
m_sizePolicy( QskSizePolicy::Preferred, QskSizePolicy::Preferred ),
|
||||||
|
m_sizeHints{ { 0, 0 }, { -1, -1 }, { c_max, c_max } }
|
||||||
{
|
{
|
||||||
resetSizeHint( Qt::MinimumSize );
|
|
||||||
resetSizeHint( Qt::PreferredSize );
|
|
||||||
resetSizeHint( Qt::MaximumSize );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QskResizable::~QskResizable()
|
QskResizable::~QskResizable()
|
||||||
@ -206,9 +207,7 @@ void QskResizable::resetSizeHint( Qt::SizeHint whichHint )
|
|||||||
}
|
}
|
||||||
case Qt::MaximumSize:
|
case Qt::MaximumSize:
|
||||||
{
|
{
|
||||||
// QGridLayoutEngine internally uses FLT_MAX
|
hint = QSizeF( c_max, c_max );
|
||||||
const qreal max = std::numeric_limits< float >::max();
|
|
||||||
hint = QSizeF( max, max );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Qt::PreferredSize:
|
case Qt::PreferredSize:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user