Skip to content

Commit

Permalink
Add tooltip to file selector widget
Browse files Browse the repository at this point in the history
to avoid people trying to directly save files in installation folder
  • Loading branch information
DelazJ authored and nyalldawson committed Jun 16, 2019
1 parent 0389ebe commit 954e77e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/qgsfilewidget.cpp
Expand Up @@ -55,11 +55,13 @@ QgsFileWidget::QgsFileWidget( QWidget *parent )
// otherwise, use the traditional QLineEdit subclass
mLineEdit = new QgsFileDropEdit( this );
mLineEdit->setDragEnabled( true );
mLineEdit->setToolTip( tr( "Full path to the file(s), including name and extension" ) );
connect( mLineEdit, &QLineEdit::textChanged, this, &QgsFileWidget::textEdited );
mLayout->addWidget( mLineEdit );

mFileWidgetButton = new QToolButton( this );
mFileWidgetButton->setText( QChar( 0x2026 ) );
mFileWidgetButton->setToolTip( tr( "Browse" ) );
connect( mFileWidgetButton, &QAbstractButton::clicked, this, &QgsFileWidget::openFileDialog );
mLayout->addWidget( mFileWidgetButton );

Expand Down

0 comments on commit 954e77e

Please sign in to comment.