Fixed CDockWidget::setWidget function to test for QAbstractScrollArea instead of QScrollArea

Now setWidget properly supports ItemViews like QTreeView or QTableView
This commit is contained in:
Uwe Kindler 2020-04-27 16:51:46 +02:00
parent 47029190dc
commit cbd2fcb0d3

View File

@ -263,7 +263,7 @@ void CDockWidget::setWidget(QWidget* widget, eInsertMode InsertMode)
takeWidget();
}
QScrollArea* ScrollAreaWidget = qobject_cast<QScrollArea*>(widget);
auto ScrollAreaWidget = qobject_cast<QAbstractScrollArea*>(widget);
if (ScrollAreaWidget || ForceNoScrollArea == InsertMode)
{
d->Layout->addWidget(widget);