-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (28 loc) · 733 Bytes
/
main.cpp
File metadata and controls
35 lines (28 loc) · 733 Bytes
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
/*
MIT License
Copyright (c) 2021 Ramesh Choudhary
*/
#include <QApplication>
#include"mainwindow.h"
//#include<QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.setWindowIcon(QIcon(QPixmap(":/Icon/AppIcon.png")));
if(argc>1)
{
int row = QString(argv[1]).toInt();
QString cmd_adjacencyMatrix;
for(int i=0;i<row;i++)
{
cmd_adjacencyMatrix.append(argv[2+i]);
cmd_adjacencyMatrix.append("\n");
}
cmd_adjacencyMatrix.remove(cmd_adjacencyMatrix.size()-2,2);
w.loadFromAdjacencyMatrix(cmd_adjacencyMatrix);
// qDebug()<<cmd_adjacencyMatrix;
}
w.show();
return a.exec();
}