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 023b4cf812920e8670118067ba9f9f6cabcf8034
Showing with 13 additions and 0 deletions.
  1. +12 −0 src/gui/editorwidgets/qgstexteditwidget.cpp
  2. +1 −0 src/gui/editorwidgets/qgstexteditwidget.h
@@ -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.