c++ - High-DPI scaling of QQuickItem-derived class -


i use qtquickcontrols 2 qquickitem-derived class in app. after set aa_enablehighdpiscaling attribute , qquickcontrols 2 components correctly on smartphone object of custom class scaled incorrectly. here app without highdpi scaling minimum zoom(the way meant work):

correct display of qquickitem

and here 1 scaling minimum zoom:

incorrect display of qquickitem

it seems on second screen object scaled , can see square pixels of textures draw qpixmap or qimage. however, images load external memory , nodes qsggeometrynode correct. can switch off scaling 1 particular qquickitem? if no, should set render correctly?

also, when try set opacity on qquickitem lot of qsgopacitynodes in scene graph node tree segmentation fault. can cause this?

so solved problem dividing size of qsgtexture qquickwindow::effectivedevicepixelratio() , multiplying size of image texture created ratio. if drawing text using on qimage should multiply font's size ratio. same thing should done geometrical shapes , qpixmap::scaled().


Comments