diff --git a/src/controls/QskScrollArea.cpp b/src/controls/QskScrollArea.cpp index 23fdca7f..643f8d3e 100644 --- a/src/controls/QskScrollArea.cpp +++ b/src/controls/QskScrollArea.cpp @@ -377,15 +377,21 @@ void QskScrollArea::adjustItem() if ( m_data->isItemResizable ) { auto size = viewContentsRect().size(); + if ( size.isEmpty() ) + { + size = QSizeF( 0.0, 0.0 ); + } + else + { + /* + For optional scrollbars the available space also depends + on wether the adjustedSize results in scroll bars. For the + moment we ignore this and start with a simplified code. TODO ... + */ + + size = qskConstrainedItemSize( item, size ); + } -#if 0 - /* - For optional scrollbars the available space also depends - on wether the adjustedSize results in scroll bars. For the - moment we ignore this and start with a simplified code. - */ -#endif - size = qskConstrainedItemSize( item, size ); item->setSize( size ); }