From: Vitaly SMETANNIKOV Date: Wed, 11 Nov 2015 14:55:25 +0000 (+0300) Subject: Issue #1071: Update view port of resized QTreeWidget X-Git-Tag: V_2.0.0_alfa2~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6e45dba1824687e1b582356e93c96a4ce6a643e9;p=modules%2Fshaper.git Issue #1071: Update view port of resized QTreeWidget --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index cadef7521..d3dffd6a2 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -64,6 +65,17 @@ public: QSize aSize = QListWidget::minimumSizeHint(); return QSize( aSize.width(), aHeight ); } + +#ifndef WIN32 +// The code is necessary only for Linux because +//it can not update viewport on widget resize +protected: + void resizeEvent(QResizeEvent* theEvent) + { + QListWidget::resizeEvent(theEvent); + QTimer::singleShot(5, viewport(), SLOT(repaint())); + } +#endif }; ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParent,