15 : QQuickImageProvider (Pixmap)
21 auto list = idStr.split (
'/', Qt::SkipEmptyParts);
25 auto realSize = requestedSize;
26 if (realSize.width () <= 0)
29 const int width = list.last ().toDouble (&ok);
30 realSize = width > 0 ? QSize (width, width) : QSize (32, 32);
35 const auto& icon =
GetIcon (list);
38 *size = icon.actualSize (realSize);
40 return icon.pixmap (realSize);
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
Reimplemented from QDeclarativeImageProvider::requestPixmap().
virtual QIcon GetIcon(const QStringList &path)=0
Implement this method to return a proper QIcon for path.