I just made an executable of a PyQt5 app via pyinstaller
. The .exe file runs like a charm on my machine. I also ran app.py
on the second machine, the result is same.
However, I sent it to my laptop to see is it working on another machine. The app is working, yet the widgets are in chaos mode. (Both machines are Windows 10)
QLineEdits width-height broken, because of this they are blocking some QLabels.
Buttons are smaller than normal size.
The whole MainWindow is smaller.
QMessageBoxes are broken, their width-height completely changed.
QLabels size are normal.
Resolutions are different on these machines, but since I set the size of MainWindow by
self.setFixedSize(width,height)
And set the size of other widgets using setGeometry()
, I thought it'll show the widgets as same on my main machine.
Note: The size of the MainWindow and widgets is not bigger than the resolution of the other machine. It should fit without any problem.
How to set PyQt5 properly so the app works same in all machines -at least Windows installed machines- so the widgets doesn't go crazy and all sizes stays same?