Skip to content
Permalink
Browse files

append required date format to field label in attribute dialog

  • Loading branch information
blazek committed Jul 5, 2013
1 parent 7587972 commit 5c6ddbaf8df251332276825831508e3f1565b09f
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/gui/qgsattributedialog.cpp
@@ -177,6 +177,13 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
{
//show attribute alias if available
QString myFieldName = vl->attributeDisplayName( fldIdx );
// by default (until user defined alias) append date format
// (validator does not allow to enter a value in wrong format)
const QgsField &myField = theFields[fldIdx];
if ( myField.type() == QVariant::Date && vl->attributeAlias( fldIdx ).isEmpty() )
{
myFieldName += " (" + vl->dateFormat( fldIdx ) + ")";
}

QWidget *myWidget = QgsAttributeEditor::createAttributeEditor( 0, 0, vl, fldIdx, myAttributes[fldIdx], mProxyWidgets );
if ( !myWidget )

0 comments on commit 5c6ddba

Please sign in to comment.
You can’t perform that action at this time.