diff options
Diffstat (limited to 'src/controls/TableView.qml')
| -rw-r--r-- | src/controls/TableView.qml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index de46469b9..5feeac014 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -951,8 +951,8 @@ ScrollView { delegate: Item { id: headerRowDelegate z:-index - width: columnCount === 1 ? viewport.width + __verticalScrollBar.width : modelData.width - implicitWidth: headerStyle.implicitWidth + width: modelData.width + implicitWidth: columnCount === 1 ? viewport.width + __verticalScrollBar.width : headerStyle.implicitWidth visible: modelData.visible height: headerStyle.height @@ -967,6 +967,7 @@ ScrollView { readonly property bool containsMouse: headerClickArea.containsMouse readonly property int column: index readonly property int textAlignment: modelData.horizontalAlignment + readonly property bool resizable: modelData.resizable } } Rectangle{ @@ -1050,13 +1051,13 @@ ScrollView { MouseArea { id: headerResizeHandle property int offset: 0 - property int minimumSize: 20 + readonly property int minimumSize: 20 preventStealing: true anchors.rightMargin: -width/2 width: Settings.hasTouchScreen ? Screen.pixelDensity * 3.5 : 16 height: parent.height anchors.right: parent.right - enabled: modelData.resizable && columnCount > 1 + enabled: modelData.resizable && columnCount > 0 onPositionChanged: { var newHeaderWidth = modelData.width + (mouseX - offset) modelData.width = Math.max(minimumSize, newHeaderWidth) |
