main.cpp 416 B

123456789101112131415161718192021
  1. #include "MainWnd.h"
  2. #include <QApplication>
  3. #include <QFile>
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. QFile qssFile(":/light.qss");
  8. if(qssFile.open(QFile::ReadOnly)){
  9. //a.setStyleSheet(qssFile.readAll());
  10. QString qssContent = qssFile.readAll();
  11. a.setStyleSheet(qssContent);
  12. }
  13. qssFile.close();
  14. MainWnd w;
  15. w.show();
  16. return a.exec();
  17. }