mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
[QgsFilterLineEdit] disable clear action when read only
This commit is contained in:
parent
e1ad1cb473
commit
cc0c1bc6a4
@ -213,6 +213,15 @@ Will select all text when this widget receives the focus.
|
|||||||
.. versionadded:: 3.0
|
.. versionadded:: 3.0
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool event( QEvent *event );
|
||||||
|
%Docstring
|
||||||
|
Reimplemented to enable/disable the clear action
|
||||||
|
depending on read-only status
|
||||||
|
|
||||||
|
.. versionadded:: 3.0.1
|
||||||
|
%End
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
virtual void clearValue();
|
virtual void clearValue();
|
||||||
|
@ -178,3 +178,11 @@ bool QgsFilterLineEdit::shouldShowClear() const
|
|||||||
}
|
}
|
||||||
return false; //avoid warnings
|
return false; //avoid warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QgsFilterLineEdit::event( QEvent *event )
|
||||||
|
{
|
||||||
|
if ( event->type() == QEvent::ReadOnlyChange )
|
||||||
|
updateClearIcon();
|
||||||
|
|
||||||
|
return QLineEdit::event( event );;
|
||||||
|
}
|
||||||
|
@ -213,6 +213,15 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit
|
|||||||
*/
|
*/
|
||||||
void setSelectOnFocus( bool selectOnFocus );
|
void setSelectOnFocus( bool selectOnFocus );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reimplemented to enable/disable the clear action
|
||||||
|
* depending on read-only status
|
||||||
|
*
|
||||||
|
* \since QGIS 3.0.1
|
||||||
|
*/
|
||||||
|
virtual bool event( QEvent *event ) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user