I am new to PyQt5, I created a grid layout as shown in figure I want to reduce the gap between the three widgets, I tried playing around margins, spacing and row stretch but none have worked, Please look ar the image in hyperlink and help me :
def createlayout(self):
self.label1=QLabel(self.label,self)
self.label2=QLabel(self.label2,self)
self.label3 = QLabel("try", self)
self.textbox = QLineEdit(self)
vbox=QGridLayout()
vbox.addWidget(self.label1,0,0,1,1)
vbox.addWidget(self.textbox,1,0,1,1)
vbox.addWidget(self.label2,2,0,1,1)
vbox.addWidget(self.label3, 3, 0, 1, 1)
vbox.setContentsMargins(1,0,0,0)
#vbox.setAlignment('AlignCenter')
vbox.setRowStretch(0, 0)
vbox.setRowStretch(1, 0)
vbox.setRowStretch(2,0)
vbox.setColumnStretch(1,0)
#vbox.setRowStretch(2,1)
vbox.setRowStretch(3,0)
vbox.setSpacing(0)