Answer the question
In order to leave comments, you need to log in
QTableView: Is it possible to swap alternating rows without delegates?
table->setAlternatingRowColors(true);
Well, do not rubbish?
From a design point of view, the easiest way to solve this problem is to make the first line black and the second white. Like this (this is not a screenshot, but an imitation).
Can this be done somehow without delegates?
Answer the question
In order to leave comments, you need to log in
It seems to be impossible. But it turned out that this is not the delegate, but the data model. The cost of it I found acceptable, so it is impossible.
Yes, how to send two bytes:
myTable->setAlternatingRowColors(true);
myTable->setStyleSheet("alternate-background-color: yellow;background-color: red;");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question