RTP dialogs: Fix: Coloring of QTreeWidgetItem do not work

This commit is contained in:
j.novak@netsystem.cz 2022-09-27 09:48:40 +00:00 committed by Jaap Keuter
parent dc521850e5
commit bb4de1a046
2 changed files with 3 additions and 0 deletions

View File

@ -763,6 +763,7 @@ void RtpPlayerDialog::addSingleRtpStream(rtpstream_id_t *id)
for (int col = 0; col < ui->streamTreeWidget->columnCount(); col++) {
QBrush fgBrush = ti->foreground(col);
fgBrush.setColor(audio_stream->color());
fgBrush.setStyle(Qt::SolidPattern);
ti->setForeground(col, fgBrush);
}

View File

@ -132,9 +132,11 @@ public:
for (int i = 0; i < columnCount(); i++) {
QBrush bgBrush = background(i);
bgBrush.setColor(bgColor);
bgBrush.setStyle(Qt::SolidPattern);
setBackground(i, bgBrush);
QBrush fgBrush = foreground(i);
fgBrush.setColor(textColor);
fgBrush.setStyle(Qt::SolidPattern);
setForeground(i, fgBrush);
}
}