Skip to content

Commit

Permalink
[edit widgets] set line edit as read-only instead of disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and m-kuhn committed Jul 21, 2014
1 parent a3447dd commit 023b4cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/gui/editorwidgets/qgstexteditwidget.cpp
Expand Up @@ -129,3 +129,15 @@ void QgsTextEditWidget::setValue( const QVariant& value )
if ( mLineEdit )
mLineEdit->setText( v );
}

void QgsTextEditWidget::setEnabled( bool enabled )
{
if ( mTextEdit )
mTextEdit->setReadOnly( !enabled );

if ( mPlainTextEdit )
mPlainTextEdit->setReadOnly( !enabled );

if ( mLineEdit )
mLineEdit->setReadOnly( !enabled );
}
1 change: 1 addition & 0 deletions src/gui/editorwidgets/qgstexteditwidget.h
Expand Up @@ -38,6 +38,7 @@ class GUI_EXPORT QgsTextEditWidget : public QgsEditorWidgetWrapper

public slots:
void setValue( const QVariant& value );
void setEnabled( bool enabled );

private:
QTextEdit* mTextEdit;
Expand Down

0 comments on commit 023b4cf

Please sign in to comment.