pyside - how to delete widgets from gridLayout
I built a ui in QT Designer and then used pyside-uic turned it into a python file and have then written some code to edit it programmatically. In otherwords I have a pushbutton Add Row that when clicked will rename itself to Remove1 and create another pusbutton name it Add Row and add it to the layout. Code when clicking Add Row , changes the name and the signals/slots: self.pb_Row[-1].setText('Remove'+str(self.nRows)) self.pb_Row[-1].clicked.disconnect( self.addRow ) self.pb_Row[-1].clicked.connect( self.removeRow ) Code when clicking Remove , removes selected button: iRow = int(self.sender()