From 9181c43d1f11fb18eaad4a52ec2457031bd646cf Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 30 May 2019 14:58:53 +0300 Subject: [PATCH] Remove QT4 compatibility. --- CMakeLists.txt | 6 +----- src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx | 10 ++-------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 337bef1..2354ac2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,11 +122,7 @@ ENDIF(SALOME_BUILD_GUI) IF(SALOME_BUILD_GUI) # Qt - IF(NOT SALOME_GUI_BUILD_WITH_QT5) - FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) - ELSE() - FIND_PACKAGE(SalomeQt5 REQUIRED) - ENDIF() + FIND_PACKAGE(SalomeQt5 REQUIRED) ENDIF(SALOME_BUILD_GUI) # OCCT FIND_PACKAGE(SalomeOpenCASCADE REQUIRED) diff --git a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx index dd96b88..452397b 100644 --- a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx @@ -490,11 +490,8 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame() myEnforcedTableWidget->setAlternatingRowColors(true); myEnforcedTableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); myEnforcedTableWidget->setSelectionBehavior(QAbstractItemView::SelectItems); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - myEnforcedTableWidget->horizontalHeader()->setResizeMode(QHeaderView::Interactive); -#else myEnforcedTableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); -#endif + myEnforcedTableWidget->resizeColumnsToContents(); myEnforcedTableWidget->hideColumn(ENF_VER_ENTRY_COLUMN); myEnforcedTableWidget->hideColumn(ENF_VER_COMPOUND_COLUMN); @@ -568,11 +565,8 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame() << tr( "GHS3D_ENF_GROUP_COLUMN" ); myEnforcedMeshTableWidget->setHorizontalHeaderLabels(enforcedMeshHeaders); myEnforcedMeshTableWidget->horizontalHeader()->setStretchLastSection(true); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - myEnforcedMeshTableWidget->horizontalHeader()->setResizeMode(QHeaderView::Interactive); -#else myEnforcedMeshTableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); -#endif + myEnforcedMeshTableWidget->setAlternatingRowColors(true); myEnforcedMeshTableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); myEnforcedMeshTableWidget->setSelectionBehavior(QAbstractItemView::SelectItems); -- 2.39.2