diff options
author | Chris Xiong <chirs241097@gmail.com> | 2022-10-31 10:48:20 -0400 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2022-10-31 10:48:20 -0400 |
commit | ac42ab0d74e4827c21423a25cf0639dbd6a42559 (patch) | |
tree | 80a469455d75e056e106c56ff4bcce046cb9c2ac | |
parent | bda14d28d2763ba84c78800022d2f06e4677d3e2 (diff) | |
download | deduper-ac42ab0d74e4827c21423a25cf0639dbd6a42559.tar.xz |
Disable horizontal scrollbar.
-rw-r--r-- | qdeduper/mingui.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/qdeduper/mingui.cpp b/qdeduper/mingui.cpp index 670b128..bb60537 100644 --- a/qdeduper/mingui.cpp +++ b/qdeduper/mingui.cpp @@ -108,16 +108,15 @@ DeduperMainWindow::DeduperMainWindow() im = new QStandardItemModel(this); lv->setModel(im); lv->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); - lv->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); + lv->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff); id = new ImageItemDelegate(); - id->set_scrollbar_margins(lv->verticalScrollBar()->width(), - lv->horizontalScrollBar()->height()); + id->set_scrollbar_margins(lv->verticalScrollBar()->width(), 0); id->set_model(im); lv->setItemDelegate(id); lv->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection); lv->setResizeMode(QListView::ResizeMode::Adjust); lv->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAsNeeded); - lv->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAsNeeded); + lv->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff); lv->setHorizontalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel); lv->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel); lv->setMinimumWidth(240); |