#ifndef KLABEL_H
#define KLABEL_H

#include <QWidget>
#include <QLabel>
//#include "mytooltip.h"

class KLabel : public QLabel
{
    Q_OBJECT
public:
    KLabel(QWidget *parent = nullptr);
    void setFontSize(int fontSize);
    QString getElidedText(QFont font,int width,QString strInfo);
    static QWidget *m_parentWidget;
    void setTipText(const QString &);
    void clear();
    QString text() const;

public Q_SLOTS:
    void setText(const QString &);

protected:
    void paintEvent(QPaintEvent *event);

private:
    QFont sysFont;
    double m_ptToPx = 1.0;

    QString m_strText;
};

#endif // KLABEL_H
