This commit is contained in:
2026-04-23 11:45:32 +08:00
commit d23c6af892
33 changed files with 6036 additions and 0 deletions

28
clickablecombobox.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef CLICKABLECOMBOBOX_H
#define CLICKABLECOMBOBOX_H
#include <QComboBox>
#include <QMouseEvent>
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