return -1 for the constraining direction
This commit is contained in:
parent
1e733c4e5c
commit
13d2814bc9
|
@ -384,7 +384,18 @@ QSizeF QskGridBox::layoutSizeHint(
|
||||||
return QSizeF();
|
return QSizeF();
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_data->engine.sizeHint( which, constraint );
|
auto hint = m_data->engine.sizeHint( which, constraint );
|
||||||
|
|
||||||
|
if ( constraint.width() >= 0.0 )
|
||||||
|
{
|
||||||
|
hint.setWidth( -1.0 );
|
||||||
|
}
|
||||||
|
else if ( constraint.height() >= 0.0 )
|
||||||
|
{
|
||||||
|
hint.setHeight( -1.0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
return hint;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskGridBox::geometryChangeEvent( QskGeometryChangeEvent* event )
|
void QskGridBox::geometryChangeEvent( QskGeometryChangeEvent* event )
|
||||||
|
|
|
@ -212,7 +212,18 @@ QSizeF QskLinearBox::layoutSizeHint(
|
||||||
return QSizeF();
|
return QSizeF();
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_data->engine.sizeHint( which, constraint );
|
auto hint = m_data->engine.sizeHint( which, constraint );
|
||||||
|
|
||||||
|
if ( constraint.width() >= 0.0 )
|
||||||
|
{
|
||||||
|
hint.setWidth( -1.0 );
|
||||||
|
}
|
||||||
|
else if ( constraint.height() >= 0.0 )
|
||||||
|
{
|
||||||
|
hint.setHeight( -1.0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
return hint;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskLinearBox::geometryChangeEvent( QskGeometryChangeEvent* event )
|
void QskLinearBox::geometryChangeEvent( QskGeometryChangeEvent* event )
|
||||||
|
|
Loading…
Reference in New Issue