QHeaderView *headerView = horizontalHeader(); headerView->setResizeMode(QHeaderView::Stretch);设置列表不能移动,你试一下