I don't think you can simply change the DPI values in the QScreen class (there are only public getter methods). Maybe there are some "hacks" for that problem if you modify the QScreen class and add a public setter or something yourself and then recompile Qt, but that might be some work and takes a lot of time...
Another solution might be to just add a scale factor to your font sizes? I don't know how many you have but that can be simply done in QML and I use something like that even for production setting to scale the fonts and other sizes properly to the device.
You could use Screen.pixelDensity
or just define your custom QML property and multiply that to all font sizes? if you do that you can dynamically change the sizes while the app is running.