fix:修复QT版本升级后主窗口(dashboardFrame)中主功能按钮hover和press状态下背景颜色失效问题

This commit is contained in:
duanshengchao 2026-01-13 17:09:46 +08:00
parent a2ab901d1d
commit 601040568c
1 changed files with 110 additions and 83 deletions

View File

@ -121,49 +121,21 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <property name="leftMargin">
<widget class="QPushButton" name="btnAllEvent"> <number>8</number>
<property name="minimumSize"> </property>
<size> <property name="topMargin">
<width>165</width> <number>8</number>
<height>55</height> </property>
</size> <property name="rightMargin">
</property> <number>8</number>
<property name="maximumSize"> </property>
<size> <property name="bottomMargin">
<width>165</width> <number>8</number>
<height>55</height> </property>
</size> <property name="spacing">
</property> <number>9</number>
<property name="styleSheet"> </property>
<string notr="true">QPushButton
{
font: 700 12pt &quot;微软雅黑&quot;;
color:rgb(250,250,250);
text-align:right;
padding-right:35px;
background-color: rgb(67,160,249);
icon-size:20px;
icon: url(:/images/icon_event.png);
}
QPushButton:hover
{
background-color: rgba(55,131,204,200);
}
QPushButton:pressed
{
background-color: rgb(67,160,249);
}
</string>
</property>
<property name="text">
<string>历史事件</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="btnAddDashboard"> <widget class="QPushButton" name="btnAddDashboard">
<property name="minimumSize"> <property name="minimumSize">
@ -188,6 +160,7 @@ icon-size:20px;
icon: url(:/images/icon_add.png); icon: url(:/images/icon_add.png);
padding-right:35px; padding-right:35px;
background-color: rgb(64, 182, 113); background-color: rgb(64, 182, 113);
border-radius:5px;
} }
QPushButton:hover QPushButton:hover
{ {
@ -207,6 +180,94 @@ background-color: rgb(39, 102, 59);
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1">
<widget class="QPushButton" name="btnAddPanel">
<property name="minimumSize">
<size>
<width>165</width>
<height>55</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>165</width>
<height>55</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
font: 700 12pt &quot;微软雅黑&quot;;
color:rgb(250,250,250);
text-align:right;
padding-right:35px;
background-color: rgb(64, 182, 113);
icon-size:20px;
icon: url(:/images/icon_add.png);
border-radius:5px;
}
QPushButton:hover
{
background-color: rgb(52, 145, 94);
}
QPushButton:pressed
{
background-color: rgb(39, 102, 59);
}
</string>
</property>
<property name="text">
<string>数据展项</string>
</property>
<property name="default">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="btnAllEvent">
<property name="minimumSize">
<size>
<width>165</width>
<height>55</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>165</width>
<height>55</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
font: 700 12pt &quot;微软雅黑&quot;;
color:rgb(250,250,250);
text-align:right;
padding-right:35px;
background-color: rgb(67,160,249);
icon-size:20px;
icon: url(:/images/icon_event.png);
border-radius:5px;
}
QPushButton:hover
{
background-color: rgb(55,131,204);
}
QPushButton:pressed
{
background-color: rgb(67,160,249);
}
</string>
</property>
<property name="text">
<string>历史事件</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QPushButton" name="btnAlarm"> <widget class="QPushButton" name="btnAlarm">
<property name="minimumSize"> <property name="minimumSize">
@ -231,6 +292,7 @@ padding-right:35px;
background-color: rgb(200, 68, 56); background-color: rgb(200, 68, 56);
icon-size:20px; icon-size:20px;
icon: url(:/images/icon_alarm.png); icon: url(:/images/icon_alarm.png);
border-radius:5px;
} }
QPushButton:hover QPushButton:hover
{ {
@ -239,51 +301,16 @@ background-color: rgb(166, 56, 46);
QPushButton:pressed QPushButton:pressed
{ {
background-color: rgb(128, 43, 36); background-color: rgb(128, 43, 36);
} }</string>
</string>
</property> </property>
<property name="text"> <property name="text">
<string>实时告警</string> <string>实时告警</string>
</property> </property>
</widget> <property name="autoDefault">
</item> <bool>false</bool>
<item row="1" column="1">
<widget class="QPushButton" name="btnAddPanel">
<property name="minimumSize">
<size>
<width>165</width>
<height>55</height>
</size>
</property> </property>
<property name="maximumSize"> <property name="flat">
<size> <bool>false</bool>
<width>165</width>
<height>55</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
font: 700 12pt &quot;微软雅黑&quot;;
color:rgb(250,250,250);
text-align:right;
padding-right:35px;
background-color: rgb(64, 182, 113);
icon-size:20px;
icon: url(:/images/icon_add.png);
}
QPushButton:hover
{
background-color: rgb(52, 145, 94);
}
QPushButton:pressed
{
background-color: rgb(39, 102, 59);
}
</string>
</property>
<property name="text">
<string>数据展项</string>
</property> </property>
</widget> </widget>
</item> </item>