added color

This commit is contained in:
moerp
2021-05-29 19:11:24 +02:00
parent 4ebda211eb
commit 4481431794
2 changed files with 8 additions and 7 deletions

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>390</width>
<height>562</height>
<width>333</width>
<height>564</height>
</rect>
</property>
<property name="windowTitle">
@ -19,7 +19,7 @@
<rect>
<x>10</x>
<y>10</y>
<width>371</width>
<width>311</width>
<height>71</height>
</rect>
</property>
@ -65,7 +65,7 @@
<rect>
<x>10</x>
<y>90</y>
<width>371</width>
<width>311</width>
<height>421</height>
</rect>
</property>
@ -79,7 +79,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>390</width>
<width>333</width>
<height>20</height>
</rect>
</property>

View File

@ -33,9 +33,10 @@ QVariant SQMTableModel::data(const QModelIndex &index, int role) const {
break;
case Qt::ForegroundRole:
if (changedHere.isValid()) {
if (row >= changedHere.row() && col >= changedHere.column()) {
result = QColor(Qt::red);
if ((row > changedHere.row() || (col >= changedHere.column() && row == changedHere.row())) && (col != 0 || changedHere.column() == 0)) {
result = QColor(Qt::red);
}
}
break;