Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QML TableView disable horizontal scrollbar

Tags:

qt

qml

I am using TableView QML component. I have 3 columns in there. Each column width is set to the table total width divided by 3. This introduces some fraction parts and in result, a horizontal scrollbar is always visible in the bottom:

enter image description here

I would like to disable this scrollbar but can't figure out how to do it. I am using QML TableView from QtQuick.Controls 1.4 (the old ones). Qt version is 5.12.3.

like image 683
Łukasz Przeniosło Avatar asked Nov 21 '25 10:11

Łukasz Przeniosło


1 Answers

Set the horizontalScrollBarPolicy to Qt.ScrollBarAlwaysOff to hide the horizontal scrollbar

like image 184
Dimitry Ernot Avatar answered Nov 24 '25 23:11

Dimitry Ernot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!