'add clients infors in  tablewidget'

def Add_data_into_QTableWidget(self, APclients):

    Headers = []
    for mac in APclients.keys():
        if (not self.APclients[mac]['in_tables']):
            self.APclients[mac]['in_tables'] = True
            try:
                d_vendor = EUI(mac)
                d_vendor = d_vendor.oui.registration().org
            except:
                d_vendor = 'unknown    device'
            self.THeaders['Mac    Address'].append(mac)
            self.THeaders['IP    Address'].append(APclients[mac]['IP'])
            self.THeaders['Devices'].append(APclients[mac]['device'])
            self.THeaders['Vendors'].append(d_vendor)
            for (n, key) in enumerate(self.THeaders.keys()):
                Headers.append(key)
                for (m, item) in enumerate(self.THeaders[key]):
                    item = QTableWidgetItem(item)
                    item.setTextAlignment((Qt.AlignVCenter | Qt.AlignCenter))
                    self.TabInfoAP.setItem(m, n, item)
            self.TabInfoAP.setHorizontalHeaderLabels(self.THeaders.keys())
    self.connectedCount.setText(str(len(APclients.keys())))
