Pyqt5 Designer Window Size Question | Sololearn: Learn to code for FREE!

+1

Pyqt5 Designer Window Size Question

I open the designer but the window there is way bigger than window when i run it. Is there any way i can fix it?

9/4/2020 6:50:11 AM

Rei

5 Answers

New Answer

+2

Can you explain me your problem in detail? I'm used to PyQT5, so probably I'll be able to help.

+2

Rei See, you cannot do everything with designer. You need to play with the code also. You can set the width and height in code where the size parameters are given, at approximately top 3rd or 4th line in the init function. MainWindow.resize(185, 126) This is the line. here you can change these parameters. First one is width, second one is height. If you dont want your app to change its size when user tries, you can write this. MainWindow.setFixedSize(185, 126) This will prevent the app from resizing, or maximising, that is, dimensions will be fixed. You can check out my projects to have a general knowledge of it. https://github.com/Chiku1022

+1

ok thank you very much

0

when i create a form in pyqt5 desiner the window in desiner is way bigger than when i run the code

0

i try to change setting but it seems nothing works. Maybe is there any way to zoom out!?