Hi,
I am currently developing using Qt 5.1.1.
I need to implement a custom style for a “TableView”. Thus I define a new TableViewStyle for my TableView including delegates: itemDelegate, headerDelegate, handle etc.
When defining the scrollbar handle delegate I tried first to define it as a simple Rectangle with a certain background color. This did not work, the scrollbar handle was not visible.
When i use Image or BackgroundImage all is fine. Can anybody explain to me why I can’t use a Rectangle here?
Also, I had trouble to find good documentation concerning the TableViewStyle. I had to gather a lot of information from the code. Am I missing a source of documentation?
Some code for explanation:
TableView {
model : id_dbaseLibModel
style : TableViewStyle
{
itemDelegate: id_itemDelegate
headerDelegate: id_headerDelegate
rowDelegate: id_rowDelegate
minimumHandleLength: 20
handleOverlap: 5
/* not working:
handle: Rectangle {
width: 10;
color: "black";
}
*/
/* working fine: */
handle: Image
{
source: "/gfx/icons/naviOff.png" // random image, temporary
}
decrementControl: Component { Rectangle{} }
incrementControl: Component { Rectangle{} }
scrollBarBackground : Rectangle { width: 10; color: "green" }
}
TableViewColumn{ ..... }
TableViewColumn{ ..... }
}
Thx
DaWoo
↧