From cbd2fcb0d33d277ae0558bedba1be7ab46e6f330 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Mon, 27 Apr 2020 16:51:46 +0200 Subject: [PATCH] Fixed CDockWidget::setWidget function to test for QAbstractScrollArea instead of QScrollArea Now setWidget properly supports ItemViews like QTreeView or QTableView --- src/DockWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 85981e3..69c13d7 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -263,7 +263,7 @@ void CDockWidget::setWidget(QWidget* widget, eInsertMode InsertMode) takeWidget(); } - QScrollArea* ScrollAreaWidget = qobject_cast(widget); + auto ScrollAreaWidget = qobject_cast(widget); if (ScrollAreaWidget || ForceNoScrollArea == InsertMode) { d->Layout->addWidget(widget);