Skip to content

Commit

Permalink
Show field alias in drag and drop designer dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 21, 2012
1 parent d1795c0 commit 9287719
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/qgsattributeeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,15 @@ QWidget* QgsAttributeEditor::createWidgetFromDef( const QgsAttributeEditorElemen
}
else
{
const QgsAttributeEditorField* fieldDef = dynamic_cast<const QgsAttributeEditorField*>( childDef );

//show attribute alias if available
QString myFieldName = vl->attributeDisplayName( fieldDef->idx() );
QLabel * mypLabel = new QLabel( myContainer );
gbLayout->addWidget( mypLabel, index, 0 );
mypLabel->setText( childDef->name() );
mypLabel->setText( myFieldName );

// add editor widget
gbLayout->addWidget( editor, index, 1 );
}

Expand Down

0 comments on commit 9287719

Please sign in to comment.