title: check state checkBox in table (pySide)
body: <p>Have table 10 row , 2 column, in first colum contain check box in second just temp text.<br>
  I need check state all checkBox in cloumn 1 after press button named Copy ( just print ).<br>
  <br>
  .............................................................................................</p>
  
  <pre><code>import PySide.QtCore as QtCore
  import PySide.QtGui as QtGui
  
  
  class chck( QtGui.QCheckBox ):
      def __init__( self, *args, **kwargs ):
          super( chck, self ).__init__( *args, **kwargs)
  
  class TestTable( QtGui.QDialog ):
      def __init__( self, parent=None ):
  
  
          QtGui.QDialog.__init__( self, parent )
          self.resize( 300, 500 )
          self.myTable = QtGui.QTableWidget()
          self.myTable.setColumnCount( 2 )
          self.myTable.setRowCount( 10 )
  
          self.copyButton = QtGui.QPushButton(self.tr("Copy"))
          self.copyButton.clicked.connect(self.copy)
  
  
  
          for i in range( 0, self.myTable.rowCount() ):
              ok = chck( '' +str(i+1))
              self.myTable.setCellWidget( i,0,ok)  # set check box                   
              item = QtGui.QTableWidgetItem("text" + str(i+1))# set tmp text 
              self.myTable.setItem(i,1,item)
  
  
          buttonLayout = QtGui.QHBoxLayout()
          buttonLayout.addStretch(1)
          buttonLayout.addWidget(self.copyButton)
  
          layout = QtGui.QVBoxLayout()
          layout.addWidget(self.myTable)   
          layout.addLayout(buttonLayout) 
  
          self.setLayout(layout)
  
  
  
  
      def copy( self ):
          for i in range( 0, self.myTable.rowCount() ):
              print "Check box " + str(i+1) + " is :" # print status QCheckBox if is on or off
  
  
  
  tableView = TestTable()
  tableView.show()
  </code></pre>