Core: Hide the horizontal scrollbar in WelcomePage

The horizontal scrollbar appears with some certain window sizes. That is
most likely due to the column count calculation not taking the vertical
scroll bar width into consideration.

This change simply prevents the unneeded horizontal scrolbar from
sporadically popping up.

Change-Id: I2fb4aac0921f4a6627058d3e73af22c1fe6db3b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2021-03-04 18:00:02 +01:00
parent 1ba7c149af
commit 011bc5ce33

View File

@@ -84,6 +84,7 @@ GridView::GridView(QWidget *parent)
setSelectionMode(QAbstractItemView::NoSelection); setSelectionMode(QAbstractItemView::NoSelection);
setFrameShape(QFrame::NoFrame); setFrameShape(QFrame::NoFrame);
setGridStyle(Qt::NoPen); setGridStyle(Qt::NoPen);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
QPalette pal; QPalette pal;
pal.setColor(QPalette::Base, themeColor(Theme::Welcome_BackgroundColor)); pal.setColor(QPalette::Base, themeColor(Theme::Welcome_BackgroundColor));