def createTable(self, cursor):
# Create table
self.tableWidget = QTableWidget()
self.tableWidget.setRowCount(cursor.rowcount)
desc = cursor.description
self.tableWidget.setColumnCount(8)
print(desc[0][0] + '\n')
print(desc[1][0] + '\n')
print(desc[2][0] + '\n')
print(desc[3][0] + '\n')
print(desc[4][0] + '\n')
print(desc[5][0] + '\n')
print(desc[6][0] + '\n')
print(desc[7][0] + '\n')
j = 0
i = 0
for row in cursor:
words = row.split()
print(row)
i = 0
for word in words:
self.tableWidget.setItem(j, i, QTableWidgetItem(word))
i = i + 1
j = j + 1
self.tableWidget.move(0, 0)
# table selection change
self.tableWidget.doubleClicked.connect(self.on_click)
For(into I=0;I<NAME.length() ;I++)
{
NAME[I]=rand() ;
NEXT [I]=(выбор числа из шаров от 0 до NAME.length()-1 без возвращения)
}
For(into I=0;I<NAME.length() ;I++)
{
Prints(NAME [NEXT[I]]) ;
}