#include "widget.h"
#include <QApplication>

#include <QApplication>
#include <QWidget>
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QGraphicsEllipseItem>
#include <QGraphicsTextItem>
#include <QFont>
#include <qmath.h>

#include "framewindow.h"
#include <QStackedWidget>
#include "framelesswindow.h"
#include <QTextCodec>
#include "logger.h"
#include "hospitalinfo.h"
#include "framebtn.h"
#include "mainbtn.h"
 void LoadStyleFile(QString strStyle)
{
    QFile qss(strStyle);
    qss.open(QFile::ReadOnly);
    QString  sqss =qss.readAll();
    qApp->setStyleSheet(sqss);
    qss.close();
}
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

#if 1
   //  QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    //qInstallMessageHandler(MessageHandler);
    QTextCodec *codec = QTextCodec::codecForName("GBK");
    QTextCodec::setCodecForLocale(codec);
    FrameWindow *mainw  = new FrameWindow;
   // FramelessWindow *window = new FramelessWindow(mainw);
    //window->resize(300, 400);
   // window->showMaximized();
     mainw->showMaximized();
     QFont globalFont;
     globalFont.setFamily("黑体");
    QApplication::setFont(globalFont);
    LoadStyleFile(QApplication::applicationDirPath()+"/defaultstyle.qss");
#endif

     return a.exec();
}
