所有的item 都设置统一的padding-left:比如25,选中的item padding-left设置为20,这样是不是就行了?
listWidget->item(current_item)->setBackgroundColor(QColor(248,168,0));实现效;