26 lines
440 B
C++
26 lines
440 B
C++
#ifndef LINELABEL_H
|
|
#define LINELABEL_H
|
|
|
|
#include <QLabel>
|
|
#include <QSize>
|
|
#include <QColor>
|
|
|
|
/**
|
|
* @brief 目前仅支持横线
|
|
*/
|
|
class LineLabel : public QLabel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
LineLabel(QWidget* parent = nullptr, QColor color = QColor(0xCC, 0xCC, 0xCC), QSize size = QSize(150, 24));
|
|
virtual ~LineLabel();
|
|
|
|
protected:
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
private:
|
|
QColor m_color;
|
|
};
|
|
|
|
#endif // LINELABEL_H
|