Fix a Qt warning for getContentsMargins

This commit is contained in:
Gaute Lindkvist committed 2020-10-20 11:05:10 +02:00
1 parent 8f5c38cb8e
commit 6220ff160c
1 file changed
+3 -3
@@ -49,10 +49,10 @@ void RiuQwtPlotLegend::resizeEvent( QResizeEvent* event )
const QwtDynGridLayout* legendLayout = qobject_cast<QwtDynGridLayout*>( contentsWidget()->layout() );
if ( legendLayout )
{
int left, right, top, bottom;
getContentsMargins( &left, &top, &right, &bottom );
QMargins margins = this->contentsMargins();
m_columnCount = std::max( 1, (int)legendLayout->columnsForWidth( size.width() - left - right ) );
m_columnCount =
std::max( 1, (int)legendLayout->columnsForWidth( size.width() - margins.left() - margins.right() ) );
updateGeometry();
}