QImage image(scene->width(), scene->height(), QImage::Format_ARGB32_Premultiplied);QPainter painter(&image);scene->render(&painter);image.save("/somepath/result.png");
image.fill(NULL);
QString puti_save; QImage image(scene->width(), scene->height(), QImage::Format_ARGB32_Premultiplied); image.fill(QColor(Qt::white).rgb()); QPainter painter(&image); scene->render(&painter); painter.end(); puti_save = ser_mumb; puti_save.append("_тест №1_").append(".PNG"); image.save(puti_save);
C++ (Qt)image.save(QString("/some/path/%1_тест №1_.PNG").arg(ser_mumb));
QString puti_save; QImage image(scene->width(), scene->height(), QImage::Format_ARGB32_Premultiplied); image.fill(QColor(Qt::white).rgb()); QPainter painter(&image); scene->render(&painter); painter.end(); puti_save = "/Графики_тестов/"; puti_save = puti_save.append(ser_mumb); puti_save.append("_тест №1_").append(".PNG"); image.save(puti_save);