Skip to content
Permalink
Browse files
Show field alias in drag and drop designer dialogs
  • Loading branch information
m-kuhn committed Dec 21, 2012
1 parent d1795c0 commit 9287719
Showing 1 changed file with 7 additions and 1 deletion.
@@ -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 );
}

0 comments on commit 9287719

Please sign in to comment.