mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-04-06 05:41:26 +03:00
align nvme headers
This commit is contained in:
@@ -288,6 +288,17 @@ void MainWindow::addNvmeLogTable(const QJsonObject &nvmeLog)
|
|||||||
tableWidget->setItemDelegateForColumn(0, new StatusDot(tableWidget));
|
tableWidget->setItemDelegateForColumn(0, new StatusDot(tableWidget));
|
||||||
tableWidget->setRowCount(nvmeLog.size());
|
tableWidget->setRowCount(nvmeLog.size());
|
||||||
|
|
||||||
|
for (int i = 0; i < tableWidget->columnCount(); ++i) {
|
||||||
|
QTableWidgetItem *headerItem = tableWidget->horizontalHeaderItem(i);
|
||||||
|
if (headerItem) {
|
||||||
|
if (i == 2) {
|
||||||
|
headerItem->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
|
} else if (i == 3) {
|
||||||
|
headerItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
for (auto smartItem = nvmeLog.constBegin(); smartItem != nvmeLog.constEnd(); ++smartItem) {
|
for (auto smartItem = nvmeLog.constBegin(); smartItem != nvmeLog.constEnd(); ++smartItem) {
|
||||||
QString id = QString("%1").arg(row, 2, 16, QChar('0')).toUpper();
|
QString id = QString("%1").arg(row, 2, 16, QChar('0')).toUpper();
|
||||||
@@ -317,7 +328,6 @@ void MainWindow::addNvmeLogTable(const QJsonObject &nvmeLog)
|
|||||||
|
|
||||||
++row;
|
++row;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user