Skip to content
Permalink
Browse files
[edit widgets] set line edit as read-only instead of disabled
  • 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.
@@ -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 );
}
@@ -38,6 +38,7 @@ class GUI_EXPORT QgsTextEditWidget : public QgsEditorWidgetWrapper

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

private:
QTextEdit* mTextEdit;

0 comments on commit 023b4cf

Please sign in to comment.