Skip to content

Commit d5fd78c

Browse files
committedAug 16, 2018
Show field alias in tooltip in form editor tab
(cherry-picked from 9a1f129)
1 parent 8e53a65 commit d5fd78c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎src/app/qgsattributesformproperties.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ void QgsAttributesFormProperties::initAvailableWidgetsTree()
105105

106106
item->setData( 0, FieldConfigRole, cfg );
107107
item->setData( 0, FieldNameRole, field.name() );
108+
109+
QString tooltip;
110+
if ( !field.alias().isEmpty() )
111+
tooltip = tr( "%1 (%2)" ).arg( field.name(), field.alias() );
112+
else
113+
tooltip = field.name();
114+
item->setToolTip( 0, tooltip );
108115
}
109116
catitem->setExpanded( true );
110117

0 commit comments

Comments
 (0)
Please sign in to comment.