code: def accept( self ):
          
          if ( not self.uiNameTXT.text() ):
              QMessageBox.information(self,
                                     'Invalid Name',
                                     'You need to supply a name for your layout.')
              return
          
          prof = self.profile()
          if ( not prof ):
              prof = XViewProfile()
          
          prof.setName(nativestring(self.uiNameTXT.text()))
          prof.setVersion(self.uiVersionSPN.value())
          prof.setDescription(nativestring(self.uiDescriptionTXT.toPlainText()))
          prof.setIcon(self.uiIconBTN.filepath())
          
          super(XViewProfileDialog, self).accept()
docs: Saves the data to the profile before closing.