title: why can't my list save everything in the QListWidget?
body: <p>I am creating a to-do list application that can save for each day (if you get into the application).And there seems to be a problem. here is my code:</p>
  <pre><code>import PySide6.QtWidgets as qtw
  import PySide6.QtCore as qtc
  import sys
  import pandas as pd
  class UI_MainWindow(qtw.QWidget):
      def __init__(self):
          super(UI_MainWindow, self).__init__()
          self.initUI()
      def initUI(self):
          self.add_item_txt = qtw.QLineEdit(self)
          self.add_item_txt.setGeometry(10,50,311,21)
  
          self.add_bnt = qtw.QPushButton(&quot;add&quot;, self)
          self.add_bnt.setToolTip(&quot;add the item in the text box to the list&quot;)
          self.add_bnt.move(0,100)
          self.add_bnt.resize(self.add_bnt.sizeHint())
          self.add_bnt.clicked.connect(self.add_item)
  
          self.delete_bnt = qtw.QPushButton(&quot;delete&quot;, self)
          self.delete_bnt.setToolTip(&quot;deletes the item that you are clicking on&quot;)
          self.delete_bnt.move(110,100)
          self.delete_bnt.resize(self.delete_bnt.sizeHint())
          self.delete_bnt.clicked.connect(self.delete_item)
  
          self.clear_bnt = qtw.QPushButton(&quot;clear&quot;, self)
          self.clear_bnt.setToolTip(&quot;add the item in the text box to the list&quot;)
          self.clear_bnt.move(220,100)
          self.clear_bnt.resize(self.add_bnt.sizeHint())
          self.clear_bnt.clicked.connect(self.clear_item)
  
          self.the_lst = qtw.QListWidget(self)
          self.the_lst.setGeometry(0,180,471,251)
  
          self.save_bnt = qtw.QPushButton(&quot;save&quot;, self)
          self.save_bnt.setToolTip(&quot;save the to-do list for today&quot;)
          self.save_bnt.move(0,440)
          self.save_bnt.resize(self.save_bnt.sizeHint())
          self.save_bnt.clicked.connect(self.save)
  
          self.quit_bnt = qtw.QPushButton(&quot;quit&quot;, self)
          self.quit_bnt.setToolTip(&quot;quits the application&quot;)
          self.quit_bnt.move(170,440)
          self.quit_bnt.resize(self.quit_bnt.sizeHint())
          self.quit_bnt.clicked.connect(self.quit)
  
          self.cal = qtw.QCalendarWidget(self)
          self.cal.move(430,540)
  
  
          self.find_bnt = qtw.QPushButton(&quot;find&quot;, self)
          self.find_bnt.setToolTip(&quot;allow you to find a specific to-do list (showed by the date) and show it&quot;)
          self.find_bnt.move(360,440)
          self.find_bnt.resize(self.find_bnt.sizeHint())
          self.find_bnt.clicked.connect(self.find_todo)
  
  
          self.show()
          self.setWindowTitle(&quot;to-do list&quot;)
          self.setGeometry(0,0,739,715)
      def add_item(self):
          item = self.add_item_txt.text()
  
          self.the_lst.addItem(item)
  
          self.add_item_txt.setText(&quot;&quot;)
  
          #self.the_lst.addItem(&quot;&quot;)
  
      def delete_item(self):
          clicked = self.the_lst.currentRow()
  
          self.the_lst.takeItem(clicked)
      
      def clear_item(self):
          self.the_lst.clear()
  
      def save(self):
          self.todo_list = []
          for the_item in range(self.the_lst.count()-1):
              print(&quot;item(s) before: &quot;, self.todo_list)
              self.todo_list.append(self.the_lst.item(the_item).text())
              print(&quot;after: &quot;, self.todo_list)
  
          print(&quot;todo list: \n&quot;, self.todo_list)
          self.today_date = self.cal.selectedDate()
          save_file_name = self.today_date.toString(&quot;yyyy&quot;)+&quot;_&quot;+self.today_date.toString(&quot;M&quot;)+&quot;_&quot;+self.today_date.toString(&quot;d&quot;)+&quot;todo.csv&quot;
          dt = pd.DataFrame(self.todo_list)
          print(&quot;dt:&quot;,dt)
  
      def find_todo(self):
          pass
  
      def quit(self):
          reply = qtw.QMessageBox.question(self,&quot;Quit?&quot;, &quot;are you sure you want to quit?&quot;, qtw.QMessageBox.Yes|qtw.QMessageBox.No,qtw.QMessageBox.No)
  
          if reply == qtw.QMessageBox.Yes:
              quit()
  
  app = qtw.QApplication(sys.argv)
  window = UI_MainWindow()
  sys.exit(app.exec_())
  
  </code></pre>
  <p>it will display something like this:
  <a href="https://i.stack.imgur.com/7Qe69.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Qe69.png" alt="enter image description here" /></a></p>
  <p>and I want to assign a list equal to each value in the <code>QListWidget</code>. But here's what happens:</p>
  <p><code>QListWidget</code>:
  <a href="https://i.stack.imgur.com/sMnIm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sMnIm.png" alt="enter image description here" /></a></p>
  <p>and here is what the list is equal to:
  <code>[&quot;item&quot;,&quot;item 1&quot;]</code></p>