PDA

View Full Version : How can I center a checkbox in a treeview?



3str
14th June 2009, 02:00
Hi everyone, I've writing a custom Model/View, and I have a checkbox in the third column using the Qt::ItemIsUserCheckable flag. But I can't get the checkbox centered in the column. It is always aligned to the left. The Qt:TextAlignmentRole only apply to text, not checkbox.

Could any one give me a hint. Thanks!

aamer4yu
14th June 2009, 06:47
You can use delegates and center the check box.
Search in the forum, this has been discussed many times.