From 653a00d63d1639bb3ebe784e25e8f126f8b4aca7 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 23 Mar 2015 16:28:42 +0100 Subject: [PATCH] Add-folder wizard: Make sure there is a scrollbar if folder names are too long Fixes #2962 --- src/gui/folderwizard.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/folderwizard.cpp b/src/gui/folderwizard.cpp index 6326194cd..88097f679 100644 --- a/src/gui/folderwizard.cpp +++ b/src/gui/folderwizard.cpp @@ -246,6 +246,12 @@ FolderWizardRemotePath::FolderWizardRemotePath(AccountPtr account) _lscolTimer.setInterval(500); _lscolTimer.setSingleShot(true); connect(&_lscolTimer, SIGNAL(timeout()), SLOT(slotLsColFolderEntry())); + +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + _ui.folderTreeWidget->header()->setSectionResizeMode(0,QHeaderView::ResizeToContents); + // Make sure that there will be a scrollbar when the contents is too wide + _ui.folderTreeWidget->header()->setStretchLastSection(false); +#endif } void FolderWizardRemotePath::slotAddRemoteFolder()