Skip to content
Permalink
Browse files

handle EnableChange event in QgsFilterLineEdit

  • Loading branch information
signedav committed Oct 25, 2018
1 parent a4bb905 commit 9768fdd0f3a302ea058ba7d1ab4fc1a205750795
@@ -125,9 +125,6 @@ The index of the currently selected item.
virtual void keyPressEvent( QKeyEvent *event );


virtual bool event( QEvent *event );


signals:

void modelUpdated();
@@ -203,14 +203,6 @@ void QgsFeatureListComboBox::keyPressEvent( QKeyEvent *event )
QComboBox::keyReleaseEvent( event );
}

bool QgsFeatureListComboBox::event( QEvent *event )
{
if ( event->type() == QEvent::EnabledChange )
mLineEdit->setShowClearButton( true );

return QComboBox::event( event );
}

bool QgsFeatureListComboBox::allowNull() const
{
return mModel->allowNull();
@@ -147,8 +147,6 @@ class GUI_EXPORT QgsFeatureListComboBox : public QComboBox

void keyPressEvent( QKeyEvent *event ) override;

bool event( QEvent *event ) override;

signals:

/**
@@ -208,7 +208,7 @@ bool QgsFilterLineEdit::shouldShowClear() const

bool QgsFilterLineEdit::event( QEvent *event )
{
if ( event->type() == QEvent::ReadOnlyChange )
if ( event->type() == QEvent::ReadOnlyChange || event->type() == QEvent::EnabledChange )
updateClearIcon();

return QLineEdit::event( event );;

0 comments on commit 9768fdd

Please sign in to comment.
You can’t perform that action at this time.