From e4d2dbd2a6a306c723da05723860cd7121e1f85b Mon Sep 17 00:00:00 2001 From: plc-user <74435298+plc-user@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:24:07 +0100 Subject: [PATCH] a minor change is enough to run code in Qt5 & Qt6 - no need to differentiate anymore --- .../qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp b/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp index 076ba5c95..072be6166 100644 --- a/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp +++ b/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp @@ -991,21 +991,14 @@ void QetGraphicsTableItem::adjustColumnsWidth() int sum_=0; for(auto i= 0 ; icolumnCount() ; ++i) { -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove - auto at_a = std::min(m_minimum_column_width.size()-1, i); //In case of the I is higher than m_minimum_column_width or - auto at_b = std::min(m_header_item->minimumSectionWidth().size()-1, i); //m_header_item->minimumSectionWidth().size() + auto at_a = std::min((int)m_minimum_column_width.size()-1, i); //In case of the I is higher than m_minimum_column_width or + auto at_b = std::min((int)m_header_item->minimumSectionWidth().size()-1, i); //m_header_item->minimumSectionWidth().size() m_header_item->resizeSection( i, std::max( m_minimum_column_width.at(at_a), m_header_item->minimumSectionWidth().at(at_b))+b); sum_+= m_header_item->sectionSize(i); -#else -#if TODO_LIST -#pragma message("@TODO remove code for QT 6 or later") -#endif - qDebug()<<"Help code for QT 6 or later"; -#endif }