@kugiigi said in [Question] getprop in a confined app?:
based on physical measurement
I think that this physicalDotsPerInch thingy could be affected by the idea that QT has about the physical size of the screen: using my first pyqt application:
from PyQt5.QtWidgets import QApplication
q=QApplication(['demo'])
ls = q.screens()
myscr=ls[0]
print(f"name={myscr.name()}")
print(f"logicalDotsPerInchX={myscr.logicalDotsPerInchX()}")
print(f"logicalDotsPerInchY={myscr.logicalDotsPerInchY()}")
print(f"physicalDotsPerInch={myscr.physicalDotsPerInch()}")
print(f"physicalDotsPerInchX={myscr.physicalDotsPerInchX()}")
print(f"physicalDotsPerInchY={myscr.physicalDotsPerInchY()}")
print(f"physicalSize={myscr.physicalSize()}")
print(f"size={myscr.size()}")
print(f"devicePixelRatio={myscr.devicePixelRatio()}")
print(f"depth={myscr.depth()}")
print(f"virtualSize={myscr.virtualSize()}")
print(f"geometry={myscr.geometry()}")
I get:
name=XWAYLAND0
logicalDotsPerInchX=96.25263157894736
logicalDotsPerInchY=96.05042016806723
physicalDotsPerInch=320.48931496290584
physicalDotsPerInchX=320.51134020618554
physicalDotsPerInchY=320.46728971962614
physicalSize=PyQt5.QtCore.QSizeF(97.0, 214.0)
size=PyQt5.QtCore.QSize(1224, 2700)
devicePixelRatio=1.0
depth=24
virtualSize=PyQt5.QtCore.QSize(1224, 2700)
geometry=PyQt5.QtCore.QRect(0, 0, 1224, 2700)
since for my FP5, the physical size of the screen is supposed to be 21.4cm, that is, 8.425 inches, this gives 2700/(21.4/2.54) = 320.4672897196262 and that's physicalDotsPerInch is reporting in my test with pyqt on my FP5. Maybe Volle phones are also misreporting the physical size of the screen ?
Edit: I think I understand; I am using straight qt and pyqt that has no knowledge of mir, that's why it is using xcb: printenv returns QT_QPA_PLATFORM=ubuntumirclient;wayland-egl;ecb
I'll search if there is a way to get a plugin to enable my pyqt for ubuntu touch maybe it could give better results.
Edit 2: not found but I now doubt that there is a good way to fix it on the FP5, Internet gave me the useful tip to use an utility called 'mirout', and it reports to me:
phablet@ubuntu-phablet:~$ mirout
Connected to server: <default>
Output 1: LVDS, connected, 1224x2700+0+0, enabled, on, 97mm x 214mm (9.3"), normal, 3.00x, unknown, phone
1224x2700 60.00*+
Output 2: DisplayPort, disconnected
Output 3: Virtual, disconnected
1920x1080 60.00*+
so the problem is indeed with the phone, not the driver.