From d9749e42ee214ba4791dd433f924c954aeba4126 Mon Sep 17 00:00:00 2001 From: halliday2023 Date: Wed, 14 Feb 2024 21:33:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=95=8C=E9=9D=A2=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=92=8C=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/DataCreating_Click.py | 8 +- ui/style.qss | 30 + ui/ui_main.ui | 1140 ++++++++++++++++++++----------------- 3 files changed, 645 insertions(+), 533 deletions(-) create mode 100644 ui/style.qss diff --git a/bin/DataCreating_Click.py b/bin/DataCreating_Click.py index a51fee6..30a6735 100644 --- a/bin/DataCreating_Click.py +++ b/bin/DataCreating_Click.py @@ -9,15 +9,19 @@ from PySide6.QtGui import QIcon from pathlib import Path path = Path(__file__) -ui_file_patch = path.parent.parent / "images" / "bjx.png" +ico_file_patch = path.parent.parent / "images" / "bjx.png" +css_file_patch = path.parent.parent / "ui" / "style.qss" if __name__ == '__main__': app = QApplication([]) app.setStyle("Fusion") - app.setWindowIcon(QIcon(str(ui_file_patch))) + app.setWindowIcon(QIcon(str(ico_file_patch))) # 样式 # print(QtWidgets.QStyleFactory.keys()) # print(app.style().name()) + with open(css_file_patch,"r") as cssfile: + _style = cssfile.read() + app.setStyleSheet(_style) win = Window() win.ui.show() sys.exit(app.exec()) diff --git a/ui/style.qss b/ui/style.qss new file mode 100644 index 0000000..9db25e7 --- /dev/null +++ b/ui/style.qss @@ -0,0 +1,30 @@ +*{ + font-family: 宋体; + font-size: 15px; +} +#Log_Output{ + margin: 10px 5px 5px 2px; +} + +#groupBox{ + margin: 5px 5px 5px 2px; +} + +#filename_label{ + margin: 5px 5px 10px 1px; +} +#output_label{ + margin: 5px 5px 15px 2px; +} +#fileinit_label{ + margin: 5px 5px 15px 2px; +} +#fileOutputText{ + margin: 5px 5px 10px 2px; +} +#fileInitRowsText{ + margin: 5px 5px 10px 2px; +} +#fileNameText{ + margin: 5px 5px 5px 2px; +} diff --git a/ui/ui_main.ui b/ui/ui_main.ui index 62e7365..ee4ba82 100644 --- a/ui/ui_main.ui +++ b/ui/ui_main.ui @@ -6,553 +6,631 @@ 0 0 - 801 - 585 + 966 + 633 DataCreating + + + - - - - 10 - 10 - 481 - 471 - - - - 0 - - - - 文件 - - - - - 90 - 30 - 201 - 31 - - - - filetest - - - qqq - - - - - - 90 - 80 - 201 - 31 - - - - - - - 90 - 130 - 201 - 31 - - - - - - - 20 - 30 - 81 - 31 - - - - 文件名 - - - - - - 20 - 80 - 61 - 31 - - - - 输出路径 - - - - - - 20 - 130 - 61 - 31 - - - - 初始数据量 - - - - - - 30 - 230 - 81 - 21 - - - - 是否持续生成: - - - - - - 0 - 200 - 81 - 31 - - - - 参数配置: - - - - - - 0 - 0 - 81 - 31 - - - - 基本信息: - - - - - - 120 - 230 - 79 - 21 - - - - 是/否 - - - true - - - - - - 40 - 270 - 291 - 131 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 10 - 40 - 91 - 21 - - - - 每次删除数据量: - - - - - - 10 - 10 - 91 - 21 - - - - 每次插入数据量: - - - - - true - - - - 110 - 10 - 81 - 21 - - - - - - - 110 - 40 - 81 - 21 - - - - - - - 200 - 10 - 54 - 16 - - - - - - - - - - 200 - 40 - 54 - 16 - - - - - - - - - - - 数据库 - - - - - 20 - 30 - 71 - 21 - - - - 数据库类型 - - - - - - 20 - 60 - 71 - 21 - - - - IP地址 - - - - - - 200 - 60 - 31 - 21 - - - - 端口 - - - - - - 300 - 60 - 61 - 21 - - - - Database - - - - - - 20 - 90 - 71 - 21 - - - - 服务名 - - - - - - 20 - 130 - 71 - 21 - - - - 用户名 - - - - - - 20 - 160 - 71 - 21 - - - - 密码 - - - - - - 0 - 240 - 71 - 21 - - - - 参数配置: - - - - - - 0 - 0 - 71 - 31 - - - - 连接信息: - - - - - - 10 - 200 - 75 - 24 - - - - 测试连接 - - - - - - 90 - 30 - 101 - 21 - - + + + - - MySQL5 - + + + + + 0 + + + + 文件 + + + + + + + + 基本信息: + + + + + + + + + + 文件名 + + + + + + + 输出路径 + + + + + + + 初始数据量 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + filetest + + + qqq + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 15 + + + + + + + + 参数配置: + + + + + 12 + 64 + 337 + 72 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + + + 每次插入数据量: + + + + + + + true + + + + + + + + + + + + + + + + + + 每次删除数据量: + + + + + + + + + + + + + + + + + + + + + + + 12 + 27 + 174 + 22 + + + + + + + 是否持续生成: + + + + + + + 是/否 + + + true + + + + + + + + + + + Qt::Vertical + + + + 20 + 20 + + + + + + + + + + + 数据库 + + + + + 20 + 30 + 71 + 21 + + + + 数据库类型 + + + + + + 20 + 60 + 71 + 21 + + + + IP地址 + + + + + + 200 + 60 + 31 + 21 + + + + 端口 + + + + + + 300 + 60 + 61 + 21 + + + + Database + + + + + + 20 + 90 + 71 + 21 + + + + 服务名 + + + + + + 20 + 130 + 71 + 21 + + + + 用户名 + + + + + + 20 + 160 + 71 + 21 + + + + 密码 + + + + + + 0 + 240 + 71 + 21 + + + + 参数配置: + + + + + + 0 + 0 + 71 + 31 + + + + 连接信息: + + + + + + 10 + 200 + 75 + 24 + + + + 测试连接 + + + + + + 90 + 30 + 101 + 21 + + + + + MySQL5 + + + + + MySQL8 + + + + + Oracle + + + + + MSSQL + + + + + + + 90 + 60 + 101 + 20 + + + + + + + 230 + 60 + 61 + 20 + + + + + + + 360 + 60 + 81 + 20 + + + + + + + 90 + 90 + 101 + 20 + + + + + + + 90 + 130 + 101 + 20 + + + + + + + 90 + 160 + 101 + 20 + + + + + + + QLineEdit::Password + + + + + + + + + 40 + 260 + 101 + 41 + + + + 每次插入数据量: + + + + + + 140 + 270 + 101 + 20 + + + + + + + + + + Qt::Horizontal + + + + 15 + 20 + + + + + + + + 输出日志: + + + + + + Qt::Vertical + + + + 20 + 5 + + + + + + + + + + + - - MySQL8 - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 开始 + + + + + + + Qt::Horizontal + + + + 10 + 20 + + + + + + + + 停止 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Oracle - - - - - MSSQL - - - - - - - 90 - 60 - 101 - 20 - - - - - - - 230 - 60 - 61 - 20 - - - - - - - 360 - 60 - 81 - 20 - - - - - - - 90 - 90 - 101 - 20 - - - - - - - 90 - 130 - 101 - 20 - - - - - - - 90 - 160 - 101 - 20 - - - - - - - QLineEdit::Password - - - - - - - - - 40 - 260 - 101 - 41 - - - - 每次插入数据量: - - - - - - 140 - 270 - 101 - 20 - - - - - - - - - 510 - 30 - 281 - 451 - - - - - - - 60 - 490 - 71 - 41 - - - - 开始 - - - - - - 370 - 490 - 71 - 41 - - - - 停止 - - + + + 0 0 - 801 + 966 22