Make the main view model use the system colors and alternate row
background
This commit is contained in:
+4
-2
@@ -227,6 +227,7 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
|
||||
int dLen;
|
||||
QString tempString;
|
||||
CANFrame thisFrame;
|
||||
static bool rowFlip = false;
|
||||
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
@@ -246,8 +247,9 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
|
||||
return msg->bgColor;
|
||||
}
|
||||
}
|
||||
//return QApplication::palette().color(QPalette::Button);
|
||||
return QColor(Qt::white);
|
||||
rowFlip = !rowFlip;
|
||||
if (rowFlip) return QApplication::palette().color(QPalette::Base);
|
||||
else return QApplication::palette().color(QPalette::AlternateBase);
|
||||
}
|
||||
|
||||
if (role == Qt::TextAlignmentRole)
|
||||
|
||||
Reference in New Issue
Block a user