#ifndef HOVERABLECOMBOBOX_H
#define HOVERABLECOMBOBOX_H

#include <QObject>
#include <QWidget>
#include <QComboBox>

class HoverableComboBox : public QComboBox
{
    Q_OBJECT
public:
    HoverableComboBox(QWidget *parent = nullptr);
    ~HoverableComboBox() override;

protected:
    void hidePopup() override
    {
       QComboBox::hidePopup();
       emit closed();
    }

    void showPopup() override
    {
       QComboBox::showPopup();
       emit opened();
    }

signals:
   void opened();
   void closed();
};

//HoverableComboBox(QObject *parent) : QComboBox (parent) { }

#endif // HOVERABLECOMBOBOX_H
