gui: rscombobox: add destructor

This commit is contained in:
chelovechishko 2022-05-13 21:34:53 +09:00
parent 7a94f9da74
commit 2e175cbc6f
2 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,11 @@ RSComboBox::RSComboBox(QWidget *parent /*= nullptr*/)
view()->installEventFilter(this);
}
RSComboBox::~RSComboBox()
{
delete this->itemDelegate();
}
bool RSComboBox::eventFilter(QObject *obj, QEvent *event)
{
if(QAbstractItemView* view = dynamic_cast<QAbstractItemView*>(obj))

View File

@ -28,6 +28,7 @@ class RSComboBox : public QComboBox
Q_OBJECT
public:
explicit RSComboBox(QWidget *parent = nullptr);
~RSComboBox();
protected:
bool eventFilter(QObject *obj, QEvent *event);