From be60a7a2fc6e742a4f95e7209e675667d6ca46d0 Mon Sep 17 00:00:00 2001 From: feiyangqingyun Date: Thu, 2 Jun 2022 14:18:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/bigscreen/index.html | 2 +- docs/iotsystem/index.html | 2 +- docs/video_system/index.html | 2 +- ui/core_qss/qss/blacksoft.css | 6 +++++- ui/styledemo/frmmain.cpp | 7 +++++++ ui/styledemo/qrc/qss/blacksoft.css | 6 +++++- ui/styledemo/qrc/qss/flatgray.css | 6 +++++- ui/styledemo/qrc/qss/lightblue.css | 6 +++++- 8 files changed, 30 insertions(+), 7 deletions(-) diff --git a/docs/bigscreen/index.html b/docs/bigscreen/index.html index 83f6cc3..f1ce071 100644 --- a/docs/bigscreen/index.html +++ b/docs/bigscreen/index.html @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/docs/iotsystem/index.html b/docs/iotsystem/index.html index f2a2519..78178c8 100644 --- a/docs/iotsystem/index.html +++ b/docs/iotsystem/index.html @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/docs/video_system/index.html b/docs/video_system/index.html index 1431684..6f82a3b 100644 --- a/docs/video_system/index.html +++ b/docs/video_system/index.html @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/ui/core_qss/qss/blacksoft.css b/ui/core_qss/qss/blacksoft.css index 5bc640a..6780634 100644 --- a/ui/core_qss/qss/blacksoft.css +++ b/ui/core_qss/qss/blacksoft.css @@ -102,7 +102,7 @@ border-radius:3px; .QGroupBox{ border:1px solid #242424; border-radius:5px; -margin-top:3ex; +margin-top:9px; } .QGroupBox::title{ @@ -680,6 +680,10 @@ border-color:#484848; color:#242424; } +QLabel:disabled{ +background:none; +} + /*TextColor:#DCDCDC*/ /*PanelColor:#444444*/ /*BorderColor:#242424*/ diff --git a/ui/styledemo/frmmain.cpp b/ui/styledemo/frmmain.cpp index 493307f..5236a24 100644 --- a/ui/styledemo/frmmain.cpp +++ b/ui/styledemo/frmmain.cpp @@ -43,6 +43,10 @@ void frmMain::initForm() void frmMain::loadStyle(const QString &qssFile) { + //开启计时 + QElapsedTimer time; + time.start(); + //加载样式表 QString qss; QFile file(qssFile); @@ -61,8 +65,11 @@ void frmMain::loadStyle(const QString &qssFile) qss = list.join("\n"); QString paletteColor = qss.mid(20, 7); qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 qApp->setStyleSheet(qss); } + + qDebug() << "用时:" << time.elapsed(); } void frmMain::on_btnStyle1_clicked() diff --git a/ui/styledemo/qrc/qss/blacksoft.css b/ui/styledemo/qrc/qss/blacksoft.css index 5bc640a..6780634 100644 --- a/ui/styledemo/qrc/qss/blacksoft.css +++ b/ui/styledemo/qrc/qss/blacksoft.css @@ -102,7 +102,7 @@ border-radius:3px; .QGroupBox{ border:1px solid #242424; border-radius:5px; -margin-top:3ex; +margin-top:9px; } .QGroupBox::title{ @@ -680,6 +680,10 @@ border-color:#484848; color:#242424; } +QLabel:disabled{ +background:none; +} + /*TextColor:#DCDCDC*/ /*PanelColor:#444444*/ /*BorderColor:#242424*/ diff --git a/ui/styledemo/qrc/qss/flatgray.css b/ui/styledemo/qrc/qss/flatgray.css index dbe4b0d..fe82b5b 100644 --- a/ui/styledemo/qrc/qss/flatgray.css +++ b/ui/styledemo/qrc/qss/flatgray.css @@ -102,7 +102,7 @@ border-radius:3px; .QGroupBox{ border:1px solid #B6B6B6; border-radius:5px; -margin-top:3ex; +margin-top:9px; } .QGroupBox::title{ @@ -680,6 +680,10 @@ border-color:#E4E4E4; color:#B6B6B6; } +QLabel:disabled{ +background:none; +} + /*TextColor:#57595B*/ /*PanelColor:#FFFFFF*/ /*BorderColor:#B6B6B6*/ diff --git a/ui/styledemo/qrc/qss/lightblue.css b/ui/styledemo/qrc/qss/lightblue.css index 8397685..4928ebd 100644 --- a/ui/styledemo/qrc/qss/lightblue.css +++ b/ui/styledemo/qrc/qss/lightblue.css @@ -102,7 +102,7 @@ border-radius:3px; .QGroupBox{ border:1px solid #C0DCF2; border-radius:5px; -margin-top:3ex; +margin-top:9px; } .QGroupBox::title{ @@ -680,6 +680,10 @@ border-color:#DEF0FE; color:#C0DCF2; } +QLabel:disabled{ +background:none; +} + /*TextColor:#386487*/ /*PanelColor:#EAF7FF*/ /*BorderColor:#C0DCF2*/