全局theme
This commit is contained in:
parent
2d7fd92013
commit
491402f7bb
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"qapplication": "cpp"
|
||||
}
|
||||
}
|
@ -43,12 +43,13 @@ set(PROJECT_SOURCES
|
||||
src/xml_opr.h src/xml_opr.cpp
|
||||
src/config.h src/config.cpp public_def.cpp public_def.h
|
||||
resource/ico.rc src/attribute_edit.ui src/attribute_edit.h
|
||||
src/attribute_edit.cpp flatgray.qrc
|
||||
src/attribute_edit.cpp
|
||||
src/data_edit.h src/data_edit.cpp src/data_edit.ui
|
||||
src/QCustomQLineEdit.h src/QCustomQLineEdit.cpp
|
||||
form/qformatset.h form/qformatset.cpp form/qformatset.ui
|
||||
resource/QtTheme.qrc
|
||||
resource.qrc
|
||||
#flatgray.qrc
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QDateTime>
|
||||
#include <QFile>
|
||||
#include <QKeyEvent>
|
||||
#include <QRegularExpression>
|
||||
#include <QScreen>
|
||||
@ -16,7 +15,7 @@
|
||||
|
||||
constexpr std::size_t g_OnePage = 100;
|
||||
namespace fs = std::filesystem;
|
||||
MainWidget::MainWidget(QWidget* parent) : QWidget(parent), ui(new Ui::MainWidget)
|
||||
MainWidget::MainWidget(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -140,16 +139,12 @@ MainWidget::MainWidget(QWidget* parent) : QWidget(parent), ui(new Ui::MainWidget
|
||||
restoreGeometry(settings.value("geometry").toByteArray());
|
||||
settings.endGroup();
|
||||
|
||||
//QFile qss_file("://qss/lightblue.css");
|
||||
// QFile qss_file("://qss/flatgray.css");
|
||||
// if (qss_file.open(QFile::ReadOnly)) {
|
||||
// qApp->setStyleSheet(qss_file.readAll());
|
||||
// }
|
||||
// QFile qss_file("://qss/lightblue.css");
|
||||
// QFile qss_file("://qss/flatgray.css");
|
||||
// if (qss_file.open(QFile::ReadOnly)) {
|
||||
// qApp->setStyleSheet(qss_file.readAll());
|
||||
// }
|
||||
|
||||
QFile file(":/QtTheme/theme/Flat/Light/Blue/Pink.qss");
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
setStyleSheet(file.readAll());
|
||||
}
|
||||
init_menu();
|
||||
// 基本处理
|
||||
base_init("");
|
||||
|
@ -2,12 +2,13 @@
|
||||
#define MAINWIDGET_H
|
||||
|
||||
#include <QAction>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMainWindow>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QTableWidget>
|
||||
#include <QWidget>
|
||||
#include <unordered_map>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "conf_setting.h"
|
||||
#include "src/attribute_edit.h"
|
||||
@ -42,7 +43,7 @@ class MainWidget;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
using ump_t = std::unordered_map<int, int>;
|
||||
class MainWidget : public QWidget
|
||||
class MainWidget : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -53,8 +54,7 @@ public:
|
||||
public:
|
||||
void set_work_exe(char* path);
|
||||
void generate_table_widget();
|
||||
void push_content(const std::vector<Element_t*>& eles, std::size_t page = 1,
|
||||
bool auto_jump_pre = false);
|
||||
void push_content(const std::vector<Element_t*>& eles, std::size_t page = 1, bool auto_jump_pre = false);
|
||||
|
||||
private:
|
||||
bool read(const QString& file_path);
|
||||
|
545
MainWidget.ui
545
MainWidget.ui
@ -1,333 +1,346 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWidget</class>
|
||||
<widget class="QWidget" name="MainWidget">
|
||||
<widget class="QMainWindow" name="MainWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1139</width>
|
||||
<height>591</height>
|
||||
<width>1171</width>
|
||||
<height>538</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWidget</string>
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>1基本信息</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>1基本信息</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnHis">
|
||||
<property name="text">
|
||||
<string>历史</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSelectFile">
|
||||
<property name="text">
|
||||
<string>选择文件</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFormat">
|
||||
<property name="text">
|
||||
<string>重排版(单独)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCustomQLineEdit" name="edStatus"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cbConfig"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnRead">
|
||||
<property name="text">
|
||||
<string>加载</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnBackup">
|
||||
<property name="text">
|
||||
<string>备份</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnResort">
|
||||
<property name="text">
|
||||
<string>重排序</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSave">
|
||||
<property name="text">
|
||||
<string>保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>2.操作</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbReplaceSelect">
|
||||
<property name="text">
|
||||
<string>所选</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbAllPage">
|
||||
<property name="text">
|
||||
<string>所有页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbRepCurPage">
|
||||
<property name="text">
|
||||
<string>当前页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbRepAll">
|
||||
<property name="text">
|
||||
<string>全局</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="edRepPre"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnReplace">
|
||||
<property name="text">
|
||||
<string>一般替</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnRxReplace">
|
||||
<property name="text">
|
||||
<string>正则替</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="edRepAfter"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbCaseSensitive">
|
||||
<property name="text">
|
||||
<string>区分大小</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="edSearchKey">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSearch">
|
||||
<property name="text">
|
||||
<string>搜索</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnReset">
|
||||
<property name="text">
|
||||
<string>重置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>3.数据</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnHis">
|
||||
<widget class="QPushButton" name="btnExit">
|
||||
<property name="text">
|
||||
<string>历史</string>
|
||||
<string>退出</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSelectFile">
|
||||
<widget class="QPushButton" name="btnExport">
|
||||
<property name="text">
|
||||
<string>选择文件</string>
|
||||
<string>导出</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFormat">
|
||||
<widget class="QPushButton" name="btnImport">
|
||||
<property name="text">
|
||||
<string>重排版(单独)</string>
|
||||
<string>导入</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCustomQLineEdit" name="edStatus"/>
|
||||
<widget class="QComboBox" name="cbUnit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cbConfig"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnRead">
|
||||
<property name="text">
|
||||
<string>加载</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnBackup">
|
||||
<property name="text">
|
||||
<string>备份</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnResort">
|
||||
<property name="text">
|
||||
<string>重排序</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSave">
|
||||
<property name="text">
|
||||
<string>保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>2.操作</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbReplaceSelect">
|
||||
<widget class="QPushButton" name="btnSet">
|
||||
<property name="text">
|
||||
<string>所选</string>
|
||||
<string>配置设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbAllPage">
|
||||
<property name="text">
|
||||
<string>所有页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbRepCurPage">
|
||||
<property name="text">
|
||||
<string>当前页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbRepAll">
|
||||
<property name="text">
|
||||
<string>全局</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="edRepPre"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnReplace">
|
||||
<property name="text">
|
||||
<string>一般替</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnRxReplace">
|
||||
<property name="text">
|
||||
<string>正则替</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="edRepAfter"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbCaseSensitive">
|
||||
<property name="text">
|
||||
<string>区分大小</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="edSearchKey">
|
||||
<widget class="QLineEdit" name="edCurPage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSearch">
|
||||
<property name="text">
|
||||
<string>搜索</string>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnReset">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>重置</string>
|
||||
<string>/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>3.数据</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<widget class="QLineEdit" name="edAllPage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnJump">
|
||||
<property name="text">
|
||||
<string>跳转</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnPagePre">
|
||||
<property name="text">
|
||||
<string>上一页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnPageNext">
|
||||
<property name="text">
|
||||
<string>下一页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnExit">
|
||||
<property name="text">
|
||||
<string>退出</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnExport">
|
||||
<property name="text">
|
||||
<string>导出</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnImport">
|
||||
<property name="text">
|
||||
<string>导入</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cbUnit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSet">
|
||||
<property name="text">
|
||||
<string>配置设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="edCurPage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="edAllPage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnJump">
|
||||
<property name="text">
|
||||
<string>跳转</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnPagePre">
|
||||
<property name="text">
|
||||
<string>上一页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnPageNext">
|
||||
<property name="text">
|
||||
<string>下一页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1171</width>
|
||||
<height>33</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
7
main.cpp
7
main.cpp
@ -1,6 +1,6 @@
|
||||
#include <QApplication>
|
||||
#include <clocale>
|
||||
|
||||
#include <QFile>
|
||||
#include "MainWidget.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@ -16,6 +16,11 @@ int main(int argc, char *argv[])
|
||||
//a.setStyle("windows");
|
||||
#endif
|
||||
|
||||
QFile file(":/QtTheme/theme/Flat/Light/Blue/Pink.qss");
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
a.setStyleSheet(file.readAll());
|
||||
}
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user