I want to adjust height and width using grid layout.
class MatchStepWidget(QWidget):
def __init__(self,parent):
super(MatchStepWidget,self).__init__(parent)
self.initUI()
def initUI(self):
layout = QGridLayout(self)
test = QTextEdit(self)
bt_test = QPushButton(self)
layout.addWidget(test,0,0,1,1)
layout.addWidget(bt_test,1,0,1,1)
# bt_test.hide()
pass
if __name__ == "__main__":
app = QApplication(sys.argv)
myapp = MatchStepWidget(None)
myapp.show()
sys.exit(app.exec_())
I set row span and col span as same for both button and textedit. but Textedit covers so much area than pushbutton How can i adjust Textedit area using grid layout?