@@ -132,6 +132,26 @@ int QgsVectorLayerAndAttributeModel::attributeIndex( const QgsVectorLayer *vl )
132132 return mAttributeIdx .value ( vl, -1 );
133133}
134134
135+ QVariant QgsVectorLayerAndAttributeModel::headerData ( int section, Qt::Orientation orientation, int role ) const
136+ {
137+ if ( orientation == Qt::Horizontal )
138+ {
139+ if ( role == Qt::DisplayRole )
140+ {
141+ if ( section == 0 )
142+ return tr ( " Layer" );
143+ else if ( section == 1 )
144+ return tr ( " Output layer attribute" );
145+ }
146+ else if ( role == Qt::ToolTipRole )
147+ {
148+ if ( section == 1 )
149+ return tr ( " Attribute containing the name of the destination layer in the DXF output." );
150+ }
151+ }
152+ return QVariant ();
153+ }
154+
135155QVariant QgsVectorLayerAndAttributeModel::data ( const QModelIndex& idx, int role ) const
136156{
137157 if ( idx.column () == 0 )
@@ -200,6 +220,11 @@ QVariant QgsVectorLayerAndAttributeModel::data( const QModelIndex& idx, int role
200220 else
201221 return vl->name ();
202222 }
223+
224+ if ( role == Qt::ToolTipRole )
225+ {
226+ return tr ( " Attribute containing the name of the destination layer in the DXF output." );
227+ }
203228 }
204229
205230 return QVariant ();
@@ -389,6 +414,7 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
389414 model->setFlags ( 0 );
390415 mTreeView ->setModel ( model );
391416 mTreeView ->resizeColumnToContents ( 0 );
417+ mTreeView ->header ()->show ();
392418
393419 connect ( mFileLineEdit , SIGNAL ( textChanged ( const QString& ) ), this , SLOT ( setOkEnabled () ) );
394420 connect ( this , SIGNAL ( accepted () ), this , SLOT ( saveSettings () ) );
0 commit comments