更新代码
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "frmmain.h"
|
||||
#include "ui_frmmain.h"
|
||||
#include "iconhelper.h"
|
||||
#include "quihelper.h"
|
||||
#include "qthelper.h"
|
||||
|
||||
frmMain::frmMain(QWidget *parent) : QDialog(parent), ui(new Ui::frmMain)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ bool frmMain::eventFilter(QObject *watched, QEvent *event)
|
||||
void frmMain::initForm()
|
||||
{
|
||||
//设置无边框
|
||||
QUIHelper::setFramelessForm(this);
|
||||
QtHelper::setFramelessForm(this);
|
||||
//设置图标
|
||||
IconHelper::setIcon(ui->labIco, 0xf099, 35);
|
||||
IconHelper::setIcon(ui->btnMenu_Min, 0xf068);
|
||||
@@ -125,7 +125,7 @@ void frmMain::on_btnMenu_Max_clicked()
|
||||
this->setGeometry(location);
|
||||
} else {
|
||||
location = this->geometry();
|
||||
this->setGeometry(QUIHelper::getScreenRect());
|
||||
this->setGeometry(QtHelper::getScreenRect());
|
||||
}
|
||||
|
||||
this->setProperty("canMove", max);
|
||||
|
||||
@@ -1,29 +1,21 @@
|
||||
#include "frmmain.h"
|
||||
#include "appinit.h"
|
||||
#include "quihelper.h"
|
||||
#include "qthelper.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QUIHelper::initMain();
|
||||
QtHelper::initMain();
|
||||
QApplication a(argc, argv);
|
||||
AppInit::Instance()->start();
|
||||
|
||||
QUIHelper::setFont();
|
||||
QUIHelper::setCode();
|
||||
|
||||
QtHelper::setFont();
|
||||
QtHelper::setCode();
|
||||
//加载样式表
|
||||
QFile file(":/qss/blacksoft.css");
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
QString qss = QLatin1String(file.readAll());
|
||||
QString paletteColor = qss.mid(20, 7);
|
||||
qApp->setPalette(QPalette(QColor(paletteColor)));
|
||||
qApp->setStyleSheet(qss);
|
||||
file.close();
|
||||
}
|
||||
QtHelper::setStyle(":/qss/blacksoft.css");
|
||||
|
||||
frmMain w;
|
||||
w.resize(800, 600);
|
||||
QUIHelper::setFormInCenter(&w);
|
||||
QtHelper::setFormInCenter(&w);
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
|
||||
@@ -13,6 +13,4 @@ RESOURCES += $$PWD/../core_qss/qss.qrc
|
||||
INCLUDEPATH += $$PWD
|
||||
INCLUDEPATH += $$PWD/form
|
||||
include ($$PWD/form/form.pri)
|
||||
|
||||
INCLUDEPATH += $$PWD/../core_base
|
||||
include ($$PWD/../core_base/core_base.pri)
|
||||
include ($$PWD/../core_helper/core_helper.pri)
|
||||
|
||||
Reference in New Issue
Block a user