#include "mainwindow/mainwindow.h" #include #include int main(int argc, char *argv[]) { QApplication a(argc, argv); QFile file(":/resources/style.qss"); // 如果放 qrc if(file.open(QFile::ReadOnly)) { QString style = file.readAll(); a.setStyleSheet(style); file.close(); } MainWindow w; w.showMaximized(); return a.exec(); }