I want to save a QChartView as a .png image. Therefore I use the following code:
QChartView *chartView = qobject_cast<QChartView*>(/* get chart view */);
QImage image;
QPainter painter(&image);
painter.setRenderHint(QPainter::Antialiasing);
chartView->render(&painter);
image.save("test.png");
When I look at the test.png image the resolution is quite bad.
Can I somehow say, that the QChartView should be rendered with a fixed resolution like 150dpi or a fixed size like (500x700 pixels)?