Mercurial > hg > svgui
diff widgets/CSVFormatDialog.cpp @ 674:d8bd193ad17d
Abbreviate very long text elements in csv file format dialog
author | Chris Cannam |
---|---|
date | Mon, 04 Nov 2013 15:48:05 +0000 |
parents | c9d6cf9c51c8 |
children | 1a0dfcbffaf1 |
line wrap: on
line diff
--- a/widgets/CSVFormatDialog.cpp Wed Oct 09 14:55:49 2013 +0100 +++ b/widgets/CSVFormatDialog.cpp Mon Nov 04 15:48:05 2013 +0000 @@ -17,6 +17,8 @@ #include "layer/LayerFactory.h" +#include "TextAbbrev.h" + #include <QFrame> #include <QGridLayout> #include <QPushButton> @@ -96,7 +98,8 @@ for (int j = 0; j < example.size() && j < 6; ++j) { QLabel *label = new QLabel; label->setTextFormat(Qt::PlainText); - label->setText(example[j][i]); + QString text = TextAbbrev::abbreviate(example[j][i], 35); + label->setText(text); label->setFont(fp); label->setPalette(palette); label->setIndent(8);