/
main.cpp
34 lines (25 loc) · 847 Bytes
/
main.cpp
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
#include <QApplication>
#include <QMainWindow>
#include <QVBoxLayout>
#include <QLabel>
#include <QTextCodec>
#include "mainwindow.h"
#include "serialport.h"
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
mainWindow *mw = new mainWindow;
SerialPort *sp = new SerialPort;
QString *msg = new QString(QMainWindow::tr("<p>Начало проверки модуля МС-54.011</p>"));
mw->setWindowTitle(QMainWindow::tr("КИНД.468354.011"));
mw->resize(1000, 500);
mw->show();
msg->append(QMainWindow::tr("<p>setNextLine()</p>"));
mw->setNextLine(msg);
QList<QSerialPortInfo> listCom = sp->getList();
QListIterator<QSerialPortInfo> i(listCom);
while(i.hasNext()){
msg->append(i.next().portName());
mw->setNextLine(msg);
}
return app.exec();
}