title: How to remove Item from QListWidget
body: <p>I'm stuck using myItem.hide() method every time I need to remove Item from QListWidget list. Hiding an item instead of deleting/removing makes things unnecessary complex. I would appreciate if you show me how to delete Item from ListWidget permanently.</p>
  
  <p><img src="https://i.stack.imgur.com/0r0tp.png" alt="enter image description here"></p>
  
  <hr>
  
  <pre><code>from PyQt4 import QtGui, QtCore
  
  class MyApp(object):    
      def __init__(self):
          super(MyApp, self).__init__()                
          self.mainWidget = QtGui.QWidget()
          self.mainLayout = QtGui.QVBoxLayout()
          self.mainWidget.setLayout(self.mainLayout)
  
          self.hLayout = QtGui.QHBoxLayout()
          self.mainLayout.insertLayout(0, self.hLayout)
          self.listA=QtGui.QListWidget()
          for i in range(3):
              self.listA.addItem('Item '+str(i))
          self.hLayout.addWidget(self.listA)
  
          self.buttonGroupbox = QtGui.QGroupBox()
          self.buttonlayout = QtGui.QVBoxLayout()
          self.buttonGroupbox.setLayout(self.buttonlayout)
  
          okButton = QtGui.QPushButton('Remove Selected')
          okButton.clicked.connect(self.removeSel)
          self.buttonlayout.addWidget(okButton)
  
          self.mainLayout.addWidget(self.buttonGroupbox)
          self.mainWidget.show()
          sys.exit(app.exec_())
  
      def removeSel(self):
          listItems=self.listA.selectedItems()
          if not listItems: return        
          for item in listItems:
              print type(item), dir(item)
  </code></pre>