Unsolved What is levelOfDetail in QStyleOptionGraphicsItem
-
What is levelOfDetail in QStyleOptionGraphicsItem
-
What is levelOfDetail in QStyleOptionGraphicsItem
and what factores decide it value
-
@Qt-Enthusiast Do you mean http://doc.qt.io/qt-4.8/qstyleoptiongraphicsitem.html#levelOfDetailFromTransform ? If so, did you read the documentation?
-
so in the following code
QImage img(w, h, QImage::Format_RGB32);
QPainter painter(&img);
render(&painter); // , QRectF(img.rect()), viewport()->rect());
img.save(nm);what changes shall I do so that levelOfDetail > 0.15
-
@Qt-Enthusiast From the link I posted:
"Its value represents the maximum value of the height and width of a unity rectangle, mapped using the worldTransform of the painter used to draw the item. By default, if no transformations are applied, its value is 1. If zoomed out 1:2, the level of detail will be 0.5, and if zoomed in 2:1, its value is 2." -
You can look at the 40000 chips example for a use case: Render a more detailed chip when zoomed in, and a less detailed one when zoomed out.