title: Adding items to QlistView
body: <p>I'm using pyqt4 with python 2.7 and I have a list view widget that I can't add items to it </p>
  
  <pre><code># -*- coding: utf-8 -*-
  
  # Form implementation generated from reading ui file 'add_category.ui'
  #
  # Created: Mon Mar 19 23:22:30 2018
  #      by: PyQt4 UI code generator 4.10
  #
  # WARNING! All changes made in this file will be lost!
  
  from PyQt4 import QtCore, QtGui
  
  try:
      _fromUtf8 = QtCore.QString.fromUtf8
  except AttributeError:
      def _fromUtf8(s):
          return s
  
  try:
      _encoding = QtGui.QApplication.UnicodeUTF8
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig, _encoding)
  except AttributeError:
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig)
  
  class Ui_Dialog1(object):
      def setupUi(self, Dialog):
          Dialog.setObjectName(_fromUtf8("Dialog"))
          Dialog.resize(608, 460)
          icon = QtGui.QIcon()
          icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/media/media/in.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
          Dialog.setWindowIcon(icon)
          self.gridLayout = QtGui.QGridLayout(Dialog)
          self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
          self.lineEdit = QtGui.QLineEdit(Dialog)
          self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
          self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 1)
          self.pushButton = QtGui.QPushButton(Dialog)
          self.pushButton.setIcon(icon)
          self.pushButton.setObjectName(_fromUtf8("pushButton"))
          self.gridLayout.addWidget(self.pushButton, 0, 6, 1, 1)
          self.label = QtGui.QLabel(Dialog)
          font = QtGui.QFont()
          font.setFamily(_fromUtf8("Adobe Arabic"))
          font.setPointSize(24)
          self.label.setFont(font)
          self.label.setObjectName(_fromUtf8("label"))
          self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
          self.listView = QtGui.QListView(Dialog)
          self.listView.setObjectName(_fromUtf8("listView"))
          entries = ['one','two', 'three']
  
          for i in entries:
              item = QtGui.QListView(i)
              self.listView.addItem(item)
          self.gridLayout.addWidget(self.listView, 1, 0, 1, 2)
          self.pushButton_2 = QtGui.QPushButton(Dialog)
          icon1 = QtGui.QIcon()
          icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/media/media/ok.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
          self.pushButton_2.setIcon(icon1)
          self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
          def go_back(self):
              Dialog.hide()
          self.pushButton_2.clicked.connect(go_back)
          self.gridLayout.addWidget(self.pushButton_2, 2, 1, 1, 1)
  
          self.retranslateUi(Dialog)
          QtCore.QMetaObject.connectSlotsByName(Dialog)
  
      def retranslateUi(self, Dialog):
          Dialog.setWindowTitle(_translate("Dialog", "إضافة فئة", None))
          self.lineEdit.setPlaceholderText(_translate("Dialog", "هنا يكتب الاسم الفئة الجديدة", None))
          self.pushButton.setText(_translate("Dialog", "إضافة", None))
          self.label.setText(_translate("Dialog", "إسـم الفئة الجديدة", None))
          self.pushButton_2.setText(_translate("Dialog", "موافق", None))
  
  import resrcs
  
  if __name__ == "__main__":
      import sys
      app = QtGui.QApplication(sys.argv)
      Dialog = QtGui.QDialog()
      ui = Ui_Dialog1()
      ui.setupUi(Dialog)
      Dialog.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>As you guys can see i used </p>
  
  <pre><code>entries = ['one','two', 'three']
  
  for i in entries:
      item = QtGui.QListView(i)
      self.listView.addItem(item)
  </code></pre>
  
  <p>But it gave me an error that is talking about arguments and data types: </p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\python\townoftechwarehouse\add_category.py", line 84, in &lt;module&gt;
      ui.setupUi(Dialog)
    File "C:\python\townoftechwarehouse\add_category.py", line 54, in setupUi
      item = QtGui.QListView(i)
  TypeError: QListView(QWidget parent=None): argument 1 has unexpected type 'str'
  [Finished in 1.7s]
  </code></pre>
  
  <p>Also, is it right to use ListView here or I should use listwidget?</p>
  
  <p>In general, what is the difference between both !!</p>