-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwindowbench.cpp
More file actions
41 lines (32 loc) · 1.17 KB
/
windowbench.cpp
File metadata and controls
41 lines (32 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <filesystem>
#include <QApplication>
#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QVBoxLayout>
#include <QProcessEnvironment>
#include <QString>
#include "windowbench.h"
windowBench::windowBench(QWidget* window ) {
setWindowTitle(tr("Run Basicviz"));
setGeometry(300, 300, 320, 240);
option = new QLabel(tr("add options"),this);
option-> move(50, 75);
QLineEdit *lineEdit = new QLineEdit(this);
lineEdit-> setGeometry(50, 100, 200, 30);
QPushButton *btnRunUtopia = new QPushButton("Run Basicviz", this);
btnRunUtopia-> setGeometry(210, 210, 100, 30);
QPushButton *applyButton = new QPushButton("Apply", this);
applyButton-> setGeometry(220, 100, 80, 30);
connect(btnRunUtopia, &QPushButton::clicked, this, &windowBench::runBench);
QObject::connect(applyButton, &QPushButton::clicked, [=]() {
text = lineEdit-> text();
});
}
void windowBench::runBench(){
QString program = shellVariable2;
QStringList arguments = text.split(' ', Qt::SkipEmptyParts);
arguments.prepend(filename);
QProcess::startDetached(program, arguments);
qDebug() << QString("Starting process: %1 %2").arg(program).arg(arguments.join(" "));
}