I'm really struggling with some of the model/view structures in Qt. In particular, I don't understand why the model is controlling the appearance. The "data" method returns visual styling information for the various roles, which means that all of the views on that model share the same presentation, which makes no sense if the purpose of the model and view separation is to isolate the model from its presentation.
When I started looking into QStyledItemDelegate, I thought it was the answer to my problem. I understand that I can use it to take over the drawing, but I don't want or need to completely handle the painting. I just need to set colors and fonts for the roles (exactly as the model is doing, but independently of the model). I don't see how to do that using a delegate unless I also draw every item myself.
This is driving me nuts. Am I missing something?
Doug
Bookmarks