Sign in

RF / weld · Files

Logo

GitLab

  • Back to group
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • weld
  • Serial-net
  • cpp-qt
  • serial-net-tool
  • commonstyle.h
  • first version
    28fb0eb8
    游杰 authored
    2019-01-07 19:32:44 +0800  
    Browse Code »
commonstyle.h 314 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef __COMMONSTYLE_H_
#define __COMMONSTYLE_H_

#include <QFile>
#include <QApplication>

class CommonHelper
{
public:
    static void setStyle(const QString &style) {
        QFile qss(style);
        qss.open(QFile::ReadOnly);
        qApp->setStyleSheet(qss.readAll());
        qss.close();
    }
};

#endif