From af317cf4c99b98e7b846e6b592e6ce0d47873584 Mon Sep 17 00:00:00 2001 From: Ivan Pelipenko Date: Tue, 8 Dec 2020 19:39:05 +0300 Subject: [PATCH] old Qt fix --- libs/widgets/qcodeedit.h | 1 + libs/widgets/qcodeedit_completer_p.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libs/widgets/qcodeedit.h b/libs/widgets/qcodeedit.h index ee7dc63..144b89c 100644 --- a/libs/widgets/qcodeedit.h +++ b/libs/widgets/qcodeedit.h @@ -23,6 +23,7 @@ #include #include #include +#include #include "iconedlabel.h" #include "qad_widgets_export.h" diff --git a/libs/widgets/qcodeedit_completer_p.cpp b/libs/widgets/qcodeedit_completer_p.cpp index 412a0d6..0b46010 100644 --- a/libs/widgets/qcodeedit_completer_p.cpp +++ b/libs/widgets/qcodeedit_completer_p.cpp @@ -8,7 +8,9 @@ QCodeEditCompleter::QCodeEditCompleter(QWidget * parent): QTreeWidget(parent) { setColumnCount(2); setRootIsDecorated(false); setHeaderHidden(true); +#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); +#endif setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); header()->setDefaultAlignment(Qt::AlignCenter); header()->