enum Qt::AlignmentFlag
flags Qt::Alignment
设置文本的对齐方式,头文件#include <Qt>
This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.
TheTextElideModeenum can also be used in many situations to fine-tune the appearance of aligned text.
The horizontal flags are:
The vertical flags are:
QTableWidgetItem *item = new QTableWidgetItem(operand1);item->setTextAlignment(Qt::AlignRight);写入小部件的设置方式tableWidget->setItem(row++,1,item);