Skip to content

Commit 0a1d644

Browse files
committed
Useful tooltips for length/precision widgets
Because *I* always get tripped up by these!
1 parent 49742c3 commit 0a1d644

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

src/ui/qgsaddattrdialogbase.ui

+16-2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
</item>
6060
<item row="5" column="0">
6161
<widget class="QLabel" name="mPrecLabel">
62+
<property name="toolTip">
63+
<string>Maximum number of digits after the decimal place. For example 123.45 requires a field precision of 2.</string>
64+
</property>
6265
<property name="text">
6366
<string>Precision</string>
6467
</property>
@@ -68,7 +71,11 @@
6871
</widget>
6972
</item>
7073
<item row="4" column="1">
71-
<widget class="QSpinBox" name="mLength"/>
74+
<widget class="QSpinBox" name="mLength">
75+
<property name="toolTip">
76+
<string>Total length of field (including the number of digits after the decimal place for decimal fields).&lt;br&gt;For example 123.45 requires a decimal field length of 5, and 123456 requires an integer field length of 6.</string>
77+
</property>
78+
</widget>
7279
</item>
7380
<item row="1" column="0">
7481
<widget class="QLabel" name="textLabel1_2">
@@ -81,10 +88,17 @@
8188
</widget>
8289
</item>
8390
<item row="5" column="1">
84-
<widget class="QSpinBox" name="mPrec"/>
91+
<widget class="QSpinBox" name="mPrec">
92+
<property name="toolTip">
93+
<string>Maximum number of digits after the decimal place. For example 123.45 requires a field precision of 2.</string>
94+
</property>
95+
</widget>
8596
</item>
8697
<item row="4" column="0">
8798
<widget class="QLabel" name="mLengthLabel">
99+
<property name="toolTip">
100+
<string>Total length of field (including the number of digits after the decimal place for decimal fields).&lt;br&gt;For example 123.45 requires a decimal field length of 5, and 123456 requires an integer field length of 6.</string>
101+
</property>
88102
<property name="text">
89103
<string>Length</string>
90104
</property>

src/ui/qgsfieldcalculatorbase.ui

+10-1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@
169169
</property>
170170
<item row="5" column="3">
171171
<widget class="QSpinBox" name="mOutputFieldPrecisionSpinBox">
172+
<property name="toolTip">
173+
<string>Maximum number of digits after the decimal place. For example 123.45 requires a field precision of 2.</string>
174+
</property>
172175
<property name="value">
173176
<number>2</number>
174177
</property>
@@ -186,6 +189,9 @@
186189
</item>
187190
<item row="5" column="0">
188191
<widget class="QLabel" name="mOutputFieldWidthLabel">
192+
<property name="toolTip">
193+
<string>Total length of field (including the number of digits after the decimal place for decimal fields).&lt;br&gt;For example 123.45 requires a decimal field length of 5, and 123456 requires an integer field length of 6.</string>
194+
</property>
189195
<property name="text">
190196
<string>Output field length</string>
191197
</property>
@@ -200,7 +206,7 @@
200206
<item row="5" column="1">
201207
<widget class="QSpinBox" name="mOutputFieldWidthSpinBox">
202208
<property name="toolTip">
203-
<string>Length of complete output. For example 123,456 means 6 as field length.</string>
209+
<string>Total length of field (including the number of digits after the decimal place for decimal fields).&lt;br&gt;For example 123.45 requires a decimal field length of 5, and 123456 requires an integer field length of 6.</string>
204210
</property>
205211
<property name="minimum">
206212
<number>0</number>
@@ -225,6 +231,9 @@
225231
</item>
226232
<item row="5" column="2">
227233
<widget class="QLabel" name="mOutputFieldPrecisionLabel">
234+
<property name="toolTip">
235+
<string>Maximum number of digits after the decimal place. For example 123.45 requires a field precision of 2.</string>
236+
</property>
228237
<property name="text">
229238
<string>Precision</string>
230239
</property>

0 commit comments

Comments
 (0)