24 lines
407 B
C++
24 lines
407 B
C++
#ifndef COMBOBOX_H
|
|
#define COMBOBOX_H
|
|
|
|
#include <QComboBox>
|
|
#include <QMouseEvent>
|
|
#include <QSerialPort>
|
|
#include <QSerialPortInfo>
|
|
|
|
class ComboBox : public QComboBox
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ComboBox(QWidget *parent = nullptr);
|
|
~ComboBox();
|
|
// 重写鼠标点击事件
|
|
void mousePressEvent(QMouseEvent *event);
|
|
signals:
|
|
private:
|
|
void scanActivePort();
|
|
};
|
|
|
|
|
|
#endif // COMBOBOX_H
|