diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2016-01-06 20:44:27 +0100 |
---|---|---|
committer | Philipp Erhardt <Philipp.Erhardt@informatik.stud.uni-erlangen.de> | 2016-01-07 18:58:59 +0100 |
commit | 583aa30ad5ba54a881650492977adaef8b6278ef (patch) | |
tree | 16b14d2935673e102e91e7806d4a7f24cb968a50 /src | |
parent | 25af37dc8639d9bec00bae7fa0542e7bb3d821d0 (diff) |
Port to non-deprecated methods of QHeaderView
They were just renamed, with the old names left for compatibility.
Diffstat (limited to 'src')
-rw-r--r-- | src/toc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/toc.cpp b/src/toc.cpp index d262910..7d7f5c8 100644 --- a/src/toc.cpp +++ b/src/toc.cpp @@ -20,8 +20,13 @@ Toc::Toc(Viewer *v, QWidget *parent) : QHeaderView *h = header(); h->setStretchLastSection(false); +#if QT_VERSION >= 0x050000 + h->setSectionResizeMode(0, QHeaderView::Stretch); + h->setSectionResizeMode(1, QHeaderView::ResizeToContents); +#else h->setResizeMode(0, QHeaderView::Stretch); h->setResizeMode(1, QHeaderView::ResizeToContents); +#endif QStringList list = QStringList() << "Contents" << QString(); setHeaderLabels(list); |