...
def __init__(self):
super().__init__()
self.setupUi(self)
self.loadData()
self.action_interface()
self.action_liststud()
def action_liststud(self):
self.liststud.itemDoubleClicked.connect(self.OpenAmpWin)
for idx in self.liststud.selectionModel.selectedIndexes():
row_numberSU = idx.row()
.....
def OpenAmpWin(self):
self.AmpWinShow = AmplyWindow()
self.AmpWinShow.show()
.....
class AmplyWindow(QtWidgets.QWidget, Ui_AmplyWindow):
def __init__(self):
super().__init__()
self.setupUi(self)
self.AmpWinAct()
def AmpWinAct(self):
condb = sqlite3.connect('datam.db')
cursor = condb.cursor()
querydb1 = """SELECT fam, imy, otch, dateb, sts FROM Sbase"""
cursor.execute(querydb1,(row_numberSU))
data1 = cursor.fetchall()
for row in data1:
a=row[0]
b=row[1]
c=row[2]
d=row[3]
e=row[4]
querydb2 = """SELECT pseries, pnumber, pkg, pkogda, psnils FROM Spass"""
cursor.execute(querydb2,(row_numberSU))
data2 = cursor.fetchall()
for row in data2:
aa=row[0]
bb=row[1]
cc=row[2]
dd=row[3]
ee=row[4]
cursor.close()