Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
ejbase.cpp 1.30 KB
Copy Edit Web IDE Raw Blame History
unix_chen authored 2018-03-26 07:59 . init
#include "ejbase.h"
#include <QSplitter>
#include <QTextEdit>
#include <QTextCodec>
#include <QPushButton>
#include <QListWidget>
#include <QFile>
#include "ejstylesheet.h"
#include "ejattrset.h"
#include "ejcareerset.h"
#include "ejskillset.h"
#include "ejitemset.h"
EjBase::EjBase(QWidget *parent) : QMainWindow(parent)
{
//设置主窗口背景色
setStyleSheet("QWidget { background-color: #323232; }");
//分割窗口
auto mainSplitter = new QSplitter(Qt::Horizontal, this);
mainSplitter->setHandleWidth(1);
mainSplitter->setStyleSheet("QSplitter::handle { background-color: #666666 }");
auto tab = new QTabWidget(mainSplitter);
tab->addTab(new EJCareerSet, tr("门派设定"));
tab->addTab(new EJAttrSet, tr("属性设定"));
tab->addTab(new EJSkillSet, tr("技能设定"));
tab->addTab(new EJItemSet, tr("道具设定"));
tab->addTab(new QTextEdit, tr("任务设定"));
tab->addTab(new QTextEdit, tr("玩家属性"));
tab->addTab(new QTextEdit, tr("宠物属性"));
tab->addTab(new QTextEdit, tr("怪物属性"));
QFile baseFile("./theme/BaseTabWidget.qss");
if (baseFile.open(QIODevice::ReadOnly | QIODevice::Text))
{
g_tabBarStyle = baseFile.readAll();
}
tab->setStyleSheet(g_tabBarStyle);
setCentralWidget(mainSplitter);
}

Comment ( 0 )

Sign in for post a comment