我正在实现一个从QitemDelegate继承的CheckBox,以将其放入QTableView中。 问题是当插入时它是靠左对齐的,而我需要它居中显示。 据我所知,负责绘制的方法是Paint。我已经编写了如下代码: void CheckBoxDelegate::paint(QPainte...