I am using PyQt5 and I am trying to prevent push button from resizing automatically. So I used this code to achieve this. My goal was if I create a button with fixed size, it won't resize on its own. So I wrote the following code:
rect = QtCore.QRect()
rect.setSize(QtCore.QSize(5, 80))
button.setGeometry(rect)
But it doesn't work. The same resize issue is still there. What is going wrong there?