Change-Id: Ie48baac0d7e9d854d96302733b196f394e85e4ea
@@ -11,9 +11,11 @@ DieItem::DieItem(int row, int col, PICK_DIE_STATUS status, qreal size, QGraphics
void DieItem::setSelected(bool selected) {
if (selected) {
- setPen(QPen(Qt::green, 1)); // 选中时边框变为绿色
+ setPen(QPen(Qt::green, 0.5)); // 选中时边框变为绿色
+ setZValue(1);
} else {
setPen(QPen(Qt::black, 0.5)); // 未选中时恢复为黑色边框
+ setZValue(0);
}
qDebug() << "DieItem clicked: Row:" << row << "Col:" << col;