hlp:编辑内容不裁剪和对齐左上角,使用绝对坐标;修改编辑框滚动条样式;上下颠倒默认取反

This commit is contained in:
kite_lucs
2026-08-26 16:23:28 +08:00
parent a274b75705
commit 4ea9d2e2c8
6 changed files with 165 additions and 51 deletions
+114 -31
View File
@@ -845,17 +845,46 @@
<number>0</number>
</property>
<item row="0" column="0">
<widget class="MyView" name="graphicsView"/>
<widget class="MyView" name="graphicsView">
<property name="minimumSize">
<size>
<width>0</width>
<height>170</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QGraphicsView QScrollBar:horizontal {
height: 28px; /* 水平滚动条高度,调大方便拖拽 */
background: #f0f0f0; /* 轨道背景色(可自行调整) */
}
QGraphicsView QScrollBar::handle:horizontal {
background: #b0b0b0; /* 滑块颜色 */
min-width: 60px; /* 滑块最小宽度,防止太小 */
border-radius: 6px;
}
</string>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="controlAreaFrame">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>190</height>
<height>150</height>
</size>
</property>
<property name="styleSheet">
@@ -880,13 +909,25 @@
</property>
<item>
<widget class="QLineEdit" name="m_LineEdit">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string>QLineEdit {
<string notr="true">QLineEdit {
background-color: #e5e5e5;
border: 1px solid #a8a8a8;
border-radius: 2px;
padding: 4px 8px;
min-height: 32px;
/*padding: 4px 8px;
min-height: 32px;*/
font-size: 16px;
}</string>
</property>
@@ -897,6 +938,12 @@
</item>
<item>
<widget class="QPushButton" name="m_btnLeft_Control1">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>34</height>
</size>
</property>
<property name="styleSheet">
<string>QPushButton {
background-color: #e5e5e5;
@@ -921,6 +968,12 @@
</item>
<item>
<widget class="QPushButton" name="m_btnRight_Control1">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>34</height>
</size>
</property>
<property name="styleSheet">
<string>QPushButton {
background-color: #e5e5e5;
@@ -960,6 +1013,12 @@
</property>
<item>
<widget class="QLabel" name="m_lblY">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>88</height>
</size>
</property>
<property name="styleSheet">
<string>QLabel {
background-color: #e5e5e5;
@@ -978,6 +1037,12 @@
</item>
<item>
<widget class="QLabel" name="m_lblX">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
<property name="styleSheet">
<string>QLabel {
background-color: #e5e5e5;
@@ -999,31 +1064,6 @@
<property name="spacing">
<number>4</number>
</property>
<item row="0" column="1">
<widget class="QPushButton" name="m_btnUp">
<property name="styleSheet">
<string>QPushButton {
background-color: #87CEEB;
border: 1px solid #4682B4;
border-radius: 4px;
min-width: 40px;
min-height: 40px;
font-size: 18px;
font-weight: bold;
color: #00008B;
}
QPushButton:hover {
background-color: #ADD8E6;
}
QPushButton:pressed {
background-color: #B0E0E6;
}</string>
</property>
<property name="text">
<string>↑</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="m_btnLeft_Arrow">
<property name="styleSheet">
@@ -1099,10 +1139,47 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="m_btnUp">
<property name="styleSheet">
<string>QPushButton {
background-color: #87CEEB;
border: 1px solid #4682B4;
border-radius: 4px;
min-width: 40px;
min-height: 40px;
font-size: 18px;
font-weight: bold;
color: #00008B;
}
QPushButton:hover {
background-color: #ADD8E6;
}
QPushButton:pressed {
background-color: #B0E0E6;
}</string>
</property>
<property name="text">
<string>↑</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="m_lblID">
<property name="minimumSize">
<size>
<width>0</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>88</height>
</size>
</property>
<property name="styleSheet">
<string>QLabel {
background-color: #e5e5e5;
@@ -1121,6 +1198,12 @@
</item>
<item>
<widget class="QPushButton" name="m_btnCheck">
<property name="minimumSize">
<size>
<width>62</width>
<height>84</height>
</size>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
@@ -1133,7 +1216,7 @@
border: 1px solid #87CEEB;
border-radius: 4px;
min-width: 60px;
min-height: 40px;
/*min-height: 40px;*/
font-size: 24px;
font-family: &quot;Ubuntu&quot;;
color: #228B22;