From 80671b4990b44074ec6540c2ecd0c7228594223c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=A0pirk?= Date: Fri, 18 Oct 2024 13:11:16 +0200 Subject: [PATCH] display multline strings in probe windows properly --- libshvvisu/src/timeline/channelprobewidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libshvvisu/src/timeline/channelprobewidget.cpp b/libshvvisu/src/timeline/channelprobewidget.cpp index 91f0854a1..37eae1427 100644 --- a/libshvvisu/src/timeline/channelprobewidget.cpp +++ b/libshvvisu/src/timeline/channelprobewidget.cpp @@ -176,10 +176,15 @@ void ChannelProbeWidget::loadValues() ui->twData->setItem(ix, DataTableColumn::ColProperty, item); ui->twData->hideColumn(DataTableColumn::ColProperty); - item = new QTableWidgetItem(pv.toString()); + QString s = pv.toString(); + if (s.endsWith('\n')) { + s.chop(1); + } + item = new QTableWidgetItem(s); item->setFlags(item->flags() & ~Qt::ItemIsEditable); ui->twData->setItem(ix, DataTableColumn::ColValue, item); } + ui->twData->verticalHeader()->resizeSections(QHeaderView::ResizeMode::ResizeToContents); } ChannelProbeWidget::FrameSection ChannelProbeWidget::getFrameSection()