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"/>
</property>
<layout class="QGridLayout" name="gridLayout">
<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);
}
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>
<property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property>
<property name="spacing">
<number>9</number>
</property>
<item row="0" column="1">
<widget class="QPushButton" name="btnAddDashboard">
<property name="minimumSize">
@ -188,6 +160,7 @@ icon-size:20px;
icon: url(:/images/icon_add.png);
padding-right:35px;
background-color: rgb(64, 182, 113);
border-radius:5px;
}
QPushButton:hover
{
@ -207,6 +180,94 @@ background-color: rgb(39, 102, 59);
</property>
</widget>
</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">
<widget class="QPushButton" name="btnAlarm">
<property name="minimumSize">
@ -231,6 +292,7 @@ padding-right:35px;
background-color: rgb(200, 68, 56);
icon-size:20px;
icon: url(:/images/icon_alarm.png);
border-radius:5px;
}
QPushButton:hover
{
@ -239,51 +301,16 @@ background-color: rgb(166, 56, 46);
QPushButton:pressed
{
background-color: rgb(128, 43, 36);
}
</string>
}</string>
</property>
<property name="text">
<string>实时告警</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="btnAddPanel">
<property name="minimumSize">
<size>
<width>165</width>
<height>55</height>
</size>
<property name="autoDefault">
<bool>false</bool>
</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);
}
QPushButton:hover
{
background-color: rgb(52, 145, 94);
}
QPushButton:pressed
{
background-color: rgb(39, 102, 59);
}
</string>
</property>
<property name="text">
<string>数据展项</string>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>