I am using TableView of QtQuick.Controls 1.4
This is the rowDelegate. I want to have just the first row of blue colour and rest of the rows (empty or non-empty) of green color.
Now, my problem is that this code does colour the first row as blue but it also colours the empty rows as blue.Qt Code:
rowDelegate: Rectangle { border.width: 1 height: 50 width: 2000 color: { var item = mymodel.get( styleData.row ) if (item.index1 === "1") return "blue" return "green" } }To copy to clipboard, switch view to plain text mode
What is the way to solve this problem?
Screenshot from 2020-12-11 20-41-06.jpg
Bookmarks