mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
controll clear button by edit-state
because it has to appear on edit-mode, otherwise not
This commit is contained in:
parent
2e01811aa7
commit
f0b0aea3b2
@ -125,6 +125,9 @@ The index of the currently selected item.
|
|||||||
virtual void keyPressEvent( QKeyEvent *event );
|
virtual void keyPressEvent( QKeyEvent *event );
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool event( QEvent *event );
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void modelUpdated();
|
void modelUpdated();
|
||||||
|
@ -203,6 +203,14 @@ void QgsFeatureListComboBox::keyPressEvent( QKeyEvent *event )
|
|||||||
QComboBox::keyReleaseEvent( 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
|
bool QgsFeatureListComboBox::allowNull() const
|
||||||
{
|
{
|
||||||
return mModel->allowNull();
|
return mModel->allowNull();
|
||||||
|
@ -147,6 +147,8 @@ class GUI_EXPORT QgsFeatureListComboBox : public QComboBox
|
|||||||
|
|
||||||
void keyPressEvent( QKeyEvent *event ) override;
|
void keyPressEvent( QKeyEvent *event ) override;
|
||||||
|
|
||||||
|
bool event( QEvent *event ) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user