Files
CuboBmsTool/hoverablecombobox.h
2022-08-01 21:53:36 +03:00

36 lines
614 B
C++

#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