]> git.lyx.org Git - lyx.git/commitdiff
Properly resize columns of child document table widget
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 7 Feb 2020 16:23:14 +0000 (17:23 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 7 Feb 2020 16:23:14 +0000 (17:23 +0100)
src/frontends/qt/GuiDocument.cpp

index d08a648375b615c86bb9b3e1357194fe546b13d1..ac4b1f1bf19977582364692c03ff3e40c5339daf 100644 (file)
@@ -893,9 +893,13 @@ GuiDocument::GuiDocument(GuiView & lv)
        masterChildModule->childrenTW->setColumnCount(2);
        masterChildModule->childrenTW->headerItem()->setText(0, qt_("Child Document"));
        masterChildModule->childrenTW->headerItem()->setText(1, qt_("Include to Output"));
-       masterChildModule->childrenTW->resizeColumnToContents(1);
-       masterChildModule->childrenTW->resizeColumnToContents(2);
-
+#if (QT_VERSION > 0x050000)
+        masterChildModule->childrenTW->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
+        masterChildModule->childrenTW->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
+#else
+        masterChildModule->childrenTW->header()->setResizeMode(0, QHeaderView::ResizeToContents);
+        masterChildModule->childrenTW->header()->setResizeMode(1, QHeaderView::ResizeToContents);
+#endif
 
        // Formats
        outputModule = new UiWidget<Ui::OutputUi>(this);