#ifndef COLORIMAGEPROVIDER_H #define COLORIMAGEPROVIDER_H #include #include #include class ColorImageProvider : public QQuickImageProvider { public: ColorImageProvider(); QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override; void setPic(QPixmap pixmap, quint32 width, quint32 height); static ColorImageProvider* getInstance(); private: QPixmap _pixmap; static ColorImageProvider* _instance; }; #endif