customer scrollbar does not show up in TableView
-
customerized scrollbar shows up if HorizontalHeaderView is removed.
If HorizontalHeaderView is added, TableView is not displayed and an error follows:
QML TableView: Cannot anchor to an item that isn't a parent or siblingBoth HorizontalHeaderView and TableView are inside ScrollView. What is wrong? They are not siblings anymore inside ScrollView? If ScrollView part is removed, scrolling still works, but no scrollbar is displayed.
GroupBox { id: root label: Label { id: titleLabel text: qsTr( "TestTable" ) } ScrollView { id: packageListScrollView anchors.fill: parent ScrollBar.horizontal.policy: ScrollBar.AlwaysOff clip: true HorizontalHeaderView { id: packageListTableHeader syncView: packageListTable anchors.top: parent.top delegate: Rectangle {} } TableView { id: packageListTable anchors.top: packageListTableHeader.bottom clip: true model: tableViewModel; delegate: Rectangle {} } ScrollBar.vertical: ScrollBar { anchors.right: parent.right policy: ScrollBar.AsNeeded // Gutter/Trough } } }
-
J JoeCFD has marked this topic as solved on