mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-15 21:32:05 +08:00
SVG render error in Qt6, so fallback to use PNG; add CustomLabel for render PNG not blurry with HIDPI Log: add PNG resources for tag icons; add CustomLabel class for PNG rendering
20 lines
414 B
C++
20 lines
414 B
C++
#ifndef CUSTOMLABEL_H
|
|
#define CUSTOMLABEL_H
|
|
|
|
#include <QLabel>
|
|
|
|
class CustomLabel : public QLabel
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
|
|
|
|
public:
|
|
explicit CustomLabel(QWidget *parent = nullptr,
|
|
Qt::WindowFlags f = Qt::WindowFlags());
|
|
|
|
virtual QPixmap pixmap() const;
|
|
virtual void setPixmap(const QPixmap &pixmap);
|
|
};
|
|
|
|
#endif // CUSTOMLABEL_H
|