code: def append_row(table, label, data):
      
      # noinspection PyUnresolvedReferences
      count = table.rowCount()
      # noinspection PyUnresolvedReferences
      table.insertRow(table.rowCount())
  
      items = QTableWidgetItem(label)
  
      # see for details of why we follow this pattern
      # http://stackoverflow.com/questions/9257422/
      # how-to-get-the-original-python-data-from-qvariant
      # Make the value immutable.
      variant = (data,)
      # To retrieve it again you would need to do:
      # value = myVariant.toPyObject()[0]
      items.setData(Qt.UserRole, variant)
      # set scenario status (ready or not) into table
      # noinspection PyUnresolvedReferences
      table.setItem(count, 0, items)
      # noinspection PyUnresolvedReferences
      table.setItem(count, 1, QTableWidgetItem(data['status']))
docs: Append new row to table widget.
  
      :param table: The table that shall have the row added to it.
      :type table: QTableWidget
  
      :param label: Label for the row.
      :type label: str
  
      :param data: custom data associated with label value.
      :type data: str