#ifndef CLICKABLECOMBOBOX_H #define CLICKABLECOMBOBOX_H #include #include class ClickableComboBox : public QComboBox { Q_OBJECT public: explicit ClickableComboBox(QWidget *parent = nullptr) : QComboBox(parent) {} signals: void clicked(); protected: void mousePressEvent(QMouseEvent *event) override { if (event->button() == Qt::LeftButton) { emit clicked(); } QComboBox::mousePressEvent(event); } }; #endif // CLICKABLECOMBOBOX_H