QComboBox *combox = new QComboBox;
static_cast<QStandardItemModel*>(combox->view()->model())->item(positon)->setTextAlignment(Qt::AlignCenter);
每次只能修改一个item的文字位置
QComboBox *combox = new QComboBox;
static_cast<QStandardItemModel*>(combox->view()->model())->item(positon)->setTextAlignment(Qt::AlignCenter);
每次只能修改一个item的文字位置