2020-06-04 15:28:45 +00:00
|
|
|
#include "mainwindow.h"
|
|
|
|
#include <QApplication>
|
|
|
|
#include "cplaywidget.h"
|
|
|
|
#include <QTimer>
|
|
|
|
#include "CameraCapture.h"
|
|
|
|
#include "mainwindow.h"
|
2020-12-06 16:01:38 +00:00
|
|
|
#include <qlibrary.h>
|
|
|
|
#include <qsysinfo.h>
|
|
|
|
#include <qt_windows.h>
|
|
|
|
#include <Tlhelp32.h>
|
2020-06-04 15:28:45 +00:00
|
|
|
|
2020-06-06 07:39:55 +00:00
|
|
|
void initQss()
|
|
|
|
{
|
|
|
|
QFile file(":/qss/css/qss.css");
|
|
|
|
if (!file.open(QIODevice::ReadOnly))
|
|
|
|
exit(0);
|
|
|
|
QTextStream in(&file);
|
|
|
|
QString css = in.readAll();
|
|
|
|
qApp->setStyleSheet(css);
|
2020-12-04 13:27:37 +00:00
|
|
|
//qApp->setFont(QFont("微软雅黑", 9));
|
2020-06-06 07:39:55 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
int RegiesterOwnType(){
|
|
|
|
//qRegisterMetaType<SerialThread>("SerialThread");
|
|
|
|
return 0;
|
|
|
|
}
|
2020-06-04 15:28:45 +00:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2020-12-06 16:01:38 +00:00
|
|
|
QssEventFilter filter;
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
app.installNativeEventFilter(&filter);
|
|
|
|
|
2020-06-06 07:39:55 +00:00
|
|
|
initQss(); //step 2
|
2020-06-04 15:28:45 +00:00
|
|
|
|
|
|
|
MainWindow main;
|
2020-06-06 07:39:55 +00:00
|
|
|
main.setGeometry(0,0,800,600);
|
|
|
|
main.setWindowTitle("视频采集rtmp推流工具");
|
|
|
|
|
2020-06-04 15:28:45 +00:00
|
|
|
main.show();
|
2020-12-06 16:01:38 +00:00
|
|
|
return app.exec();
|
2020-06-04 15:28:45 +00:00
|
|
|
}
|