We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3447dd commit 023b4cfCopy full SHA for 023b4cf
src/gui/editorwidgets/qgstexteditwidget.cpp
@@ -129,3 +129,15 @@ void QgsTextEditWidget::setValue( const QVariant& value )
129
if ( mLineEdit )
130
mLineEdit->setText( v );
131
}
132
+
133
+void QgsTextEditWidget::setEnabled( bool enabled )
134
+{
135
+ if ( mTextEdit )
136
+ mTextEdit->setReadOnly( !enabled );
137
138
+ if ( mPlainTextEdit )
139
+ mPlainTextEdit->setReadOnly( !enabled );
140
141
+ if ( mLineEdit )
142
+ mLineEdit->setReadOnly( !enabled );
143
+}
src/gui/editorwidgets/qgstexteditwidget.h
@@ -38,6 +38,7 @@ class GUI_EXPORT QgsTextEditWidget : public QgsEditorWidgetWrapper
38
39
public slots:
40
void setValue( const QVariant& value );
41
+ void setEnabled( bool enabled );
42
43
private:
44
QTextEdit* mTextEdit;
0 commit comments