Quote Originally Posted by anda_skoa View Post
Qt Code:
  1. QVariant MyModel::data(const QModelIndex & index, int role) const
  2. {
  3. if (role == ImageRole) {
  4. return QString::number(index.row());
  5. }
  6.  
  7. /// other data
  8. }
  9.  
  10. QImage MyModel::image(const QString &id) const
  11. {
  12. int row = id.toInt();
  13.  
  14. // load BLOB for image on row "row", return
  15. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. Image {
  2. source: "image://mysqlimageprovider/" * model.image
  3. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. QImage MyImageProvider::requestImage(const QString &d, QSize *size, const QSize &requestedSize, bool requestedAutoTransform)
  2. {
  3. QImage image = myModel->image(id);
  4. *size = image.size();
  5. return image;
  6. }
To copy to clipboard, switch view to plain text mode 

You could even inherit your model from both the current base class and QQuickImageProvider.

Cheers,
_
Wow, superb idea! Will try asap!