resize qpushbutton pyqt 1

resize qpushbutton pyqt

pybutton = QPushButton('Click me', self)pybutton.resize(100,32)pybutton.move(50, 50)        pybutton.clicked.connect(self.clickMethod)

Here is what the above code is Doing:
1. We create a QPushButton widget.
2. We resize the button to 100×32 pixels.
3. We move the button to the position 50,50 on the window.
4. We connect the clicked signal to the clickMethod function.

Similar Posts