How to set the alignment in a TableView?
Hello,I'm using the model/view architecture to render some data (strings).
I created my model and gave it to the view and it works fine. Now a question arises:"How can i set the alignment of the displayed items?". I suppose I have to modify the QStyleOptionViewItem structure of my view but I don't know how to do. Must I create a new Style and rewrite a drawSomething function and the call setStyle?
Thanks.
Simone
Re: How to set the alignment in a TableView?
Set appropriate Qt::TextAlignmentRole in the model for items you want to have changed alignment.