old Qt fix

This commit is contained in:
2020-12-08 19:39:05 +03:00
parent 5408ad7178
commit af317cf4c9
2 changed files with 3 additions and 0 deletions

View File

@@ -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()->