Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Transfer the size of the font in the operating system to the Python Qt program
PythonQTMarlem last edited by
in the Windows operating system, people with a visual impairment can increase the font of the operating system to 125% in "Settings" → "Ease of use" → "Display" in "Increase text". My Python Qt program does not make this change.
With Java Swing it can be achieved by implementing a certain Java code. With JavaFX the transfer works without extra Java code.
What do I have to do for such a change to be applied to my Python Qt program?
PythonQTMarlem last edited by PythonQTMarlem
def applicationtypesetting(appv, fontsize): font = appv.font() font.setPointSize(font.pointSize() * fontsize) appv.setFont(font) def main(): app = QtWidgets.QApplication() win = MainWindow() if len(sys.argv) >= 2: applicationtypesetting(app, int(sys.argv)) else: applicationtypesetting(app, 1); win.showNormal() app.exec_()
If someone has a visual impairment they can call the program as follows:
python.exe PQTTexteditor.py 2
Question: Do the Python professionals have a better idea?