Tableview and listview
-
Hi, when we using listview and tableview in customized for what is the best way to create borders of customised row and column
@P-priya probably some variation on using a
Rectangle
with the border colour and width set. It depends what your delegate looks like. For example if it is a simpleLabel
then the rectangle can be set as thebackground
. Alternatively you might want to place your whole delegate in a rectangle. It depends what you are trying to do.One thing to watch out for is that you will get double thickness borders between elements by default. Let's say your rectangle border has width 1. Where two items are adjacent, each will contribute a border of thickness 1 so it will look like a border of thickness 2 on interior elements (but not the top and bottom border of whole list). The trick to avoid this is to set your
ListView
spacing
to -1 (or -3 if the border width is 3 etc.).