How create dynamic arrays of QImage?
Unsolved
General and Desktop
-
I want try something this
void load(QImage *imgs) { //read number of images (int num) imgs = new QImage[num]{}; for (uint i = 0; i < num; i++) { //read data (QByteArray data) from QFile QImage img{QImage::fromData(data, "PNG")}; int w{img.width()}; int h{img.height()}; imgs[i] = img.scaled(w * scale, h *scale); } }
But imgs outside has deleted QImage, operator= use & and not copy object(((
Can use only dynamic arrays