[Interest] High-DPI scaling of QQuickItem-derived class

Artem Fedoskin afedoskin3 at gmail.com
Mon Aug 8 17:39:43 CEST 2016


Hello,

I use QtQuickControls 2 together with QQuickItem-derived class in my app.
After I set AA_EnableHighDpiScaling attribute and all QQuickControls 2
components look correctly on my smartphone but object of my custom class is
scaled incorrectly. Here is the app without HighDpi scaling with minimum
zoom(the way it is meant to work):

http://pasteboard.co/6dmRQpVaZ.png

And here is the one with scaling with minimum zoom:

http://pasteboard.co/CxdoQ7rr.png

It seems that on the second screen the object is scaled too much and I can
see square pixels of all textures that I draw with QPixmap or QImage.
However, the images that I load from external memory and nodes like
QSGGeometryNode look correct. Could someone tell me what is the problem?
Can I switch off scaling for just one particular QQuickItem? If no, what
should I set to render it correctly?

Also, when I try to set opacity on QQuickItem with a lot of QSGOpacityNodes
in scene graph node tree I get segmentation fault. What can cause this?

Regards, Artem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160808/c116b341/attachment.html>


More information about the Interest mailing list