I created an interface using Qt Designer and integrated it into my python code using PyQt5. I then created an exe file using Pyinstaller and the interface shows up fine on my la
This issue is solved by adding a few more lines of code as shown below. Someone already posted this answer but they deleted it probably thinking its wrong as it took me a while to get back to them with the results, so thank you!
from PyQt5 import uic, QtWidgets
import sys
# Enable high DPI scaling
if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
PyQt5.QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
PyQt5.QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
app = QtWidgets.QApplication(sys.argv)
window = uic.loadUi('interface.ui')
window.show()
sys.exit(app.exec_())