Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Headers at left of TableView and ResizeMode for headers

$
0
0
I want to resize columns to width of contents (analogically to QHeaderView::ResizeToContents). It doesn’t matter how to resize columns: one time by request (like QHeaderView::resizeSections) or automaticaly (like QHeaderView::setResizeMode mode). I didn’t find any TableView or TableViewColumn property to achieve that. I tried to modify width of headerDelegate to contentWidth but I couldn’t find way to modify child of headerDelegate Component which is StyleItem (see source code [qt.gitorious.org]). I also need to make first column to be a header and I wrote: TableViewColumn { role: "name"; title: "Permission"; delegate: table.headerDelegate } I got that: As you can see, height of rows is too small. I also got those errors: file:///usr/lib64/qt5/qml/QtQuick/Controls/Styles/Desktop/TableViewStyle.qml:75: Unable to assign [undefined] to bool file:///usr/lib64/qt5/qml/QtQuick/Controls/Styles/Desktop/TableViewStyle.qml:73: Unable to assign [undefined] to bool As I understand that’s because styleData.pressed and styleData.containsMouse are not connected to TableViewColumn delegate. How can I achieve my goals?

Viewing all articles
Browse latest Browse all 13965

Latest Images

Trending Articles



Latest Images