Skip to content

Commit c546c04

Browse files
committed
make show csv txt dialog nicer: better size for smaller screens and no line wrap
1 parent d9c57fe commit c546c04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

QtPMbrowser/pmbrowserwindow.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,7 @@ void PMbrowserWindow::showCSVtxtInDialog(const QString& txt)
11041104
textedit->append(txt);
11051105
textedit->setReadOnly(true);
11061106
textedit->setTabStopDistance(160);
1107+
textedit->setLineWrapMode(QTextEdit::NoWrap);
11071108
auto btn_copy = new QPushButton("copy");
11081109
auto btn_close = new QPushButton("close");
11091110
QGridLayout* grid = new QGridLayout;
@@ -1115,7 +1116,7 @@ void PMbrowserWindow::showCSVtxtInDialog(const QString& txt)
11151116
grid->setColumnStretch(2, 1);
11161117
QDialog dlg(this);
11171118
dlg.setLayout(grid);
1118-
dlg.setGeometry(0, 0, 800, 800);
1119+
dlg.setGeometry(0, 0, 600, 400);
11191120
QObject::connect(btn_close, &QPushButton::clicked, &dlg, &QDialog::accept);
11201121
QObject::connect(btn_copy, &QPushButton::clicked, this, [&]{
11211122
QGuiApplication::clipboard()->setText(txt);

0 commit comments

Comments
 (0)