-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
executable file
·38 lines (30 loc) · 864 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
35
36
37
#include "mainwindow.h"
#include <QApplication>
#include <QDebug>
#include <QFile>
#include "mythread.h"
#include "treatthread.h"
#include "QObject"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
MyThread thread;
TreatThread Tthread;
QObject::connect( & thread, SIGNAL( trigger() ),
& Tthread, SLOT( tempDeVol() ) );
QObject::connect(& thread, SIGNAL( temp() ),
& Tthread, SLOT( voirTemps() ) );
QFile file("/Users/nicolasjbeyli/build-Projet-Desktop_Qt_5_2_1_clang_64bit-Debug/MyStyle.qss");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
qDebug()<<"MaZabat";
QTextStream in(&file);
QString s("");
while (!in.atEnd()) {
s+= in.readLine();
}
w.setStyleSheet(s);
thread.start();
return a.exec();
}