title: iterate over items in QTableWidget
body: <p>I have created a simple table with the <code>QTableWidget</code> class and inserted some data. </p>
  
  <p>I thought iterating over the table would be fairly easy like</p>
  
  <pre><code> for item in self.table_widget.items():
              print(item)
  
  </code></pre>
  
  <p>this code obviously doesnt work, but is there a pythonic way to iterate over the items in the created table ?
  For example to print all the items from the first column ? </p>
  
  <p>So far I didnt find usefull documentation how to do that operation in qt</p>
  
  <p>In the code below I managed to get the data from the current selected cell but thats not the output I wanted </p>
  
  <pre><code>
  import sys
  from PyQt5 import QtWidgets as qtw
  from PyQt5 import QtCore as qtc
  from PyQt5 import QtGui as qtg
  
  
  
  
  
  class LambdaTableWidget(qtw.QWidget):
      '''
      Main Window mit
      '''
  
  
  
      def __init__(self, *args, **kwargs):
          super().__init__(*args, **kwargs)
          # your code will go here
  
  
          # interface
  
          # position
          qtRectangle = self.frameGeometry()
          centerPoint = qtw.QDesktopWidget().availableGeometry().center()
          qtRectangle.moveCenter(centerPoint)
          self.move(qtRectangle.topLeft())
          # size
          self.resize(700, 410)
          # frame title
          self.setWindowTitle("QTableWidget Test")
          # heading
          heading_label = qtw.QLabel('add Widget')
          heading_label.setAlignment(qtc.Qt.AlignHCenter | qtc.Qt.AlignTop)
  
  
  
  
          # add Button
          self.addwidget_button = qtw.QPushButton("add Widget")
          self.test_button = qtw.QPushButton("test feature")
  
          # table Widget
          self.table_widget = qtw.QTableWidget(12 , 3)
  
          self.table_widget.removeRow(-1)
          self.table_widget.insertRow(-1)
  
          # layout
          self.main_layout = qtw.QGridLayout()
          self.main_layout.addWidget(self.addwidget_button, 0, 0)
          self.main_layout.addWidget(self.test_button, 1, 0)
          self.main_layout.addWidget(self.table_widget,2,0)
          self.setLayout(self.main_layout)
  
          self.show()
  
          # functionality
          self.test_button.clicked.connect(self.iterateover)
  
      def iterateover(self):
          row = self.table_widget.currentRow()
          colum = self.table_widget.currentColumn()
          value = self.table_widget.item(row,colum)
          value = value.text()
          print(value)
  
  
      def iterate(self):
          for item in self.table_widget.items():
              print(item)
  
  
  if __name__ == '__main__':
      app = qtw.QApplication(sys.argv)
      w = LambdaTableWidget()
      sys.exit(app.exec_())
  
  
  
  </code></pre>