From 5a48fc61ee7e97e067b8bbbd09b805a8015d040d Mon Sep 17 00:00:00 2001 From: Dmitriy Kirichenko Date: Thu, 23 Nov 2023 16:03:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D1=85=D0=BE=D0=B4=20=D0=B2=20?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=8E=20=D1=81=D0=BE=20=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D1=81=D1=82=D0=B8=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designs/stats.ui | 18 ++++++++++++++++++ stats.py | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/designs/stats.ui b/designs/stats.ui index 7addcb6..62d1410 100644 --- a/designs/stats.ui +++ b/designs/stats.ui @@ -49,6 +49,24 @@ + + + + 660 + 520 + 201 + 71 + + + + + 24 + + + + Назад + + diff --git a/stats.py b/stats.py index 7197b56..92addd7 100644 --- a/stats.py +++ b/stats.py @@ -20,5 +20,10 @@ def __init__(self): self.lastPoem.setText(f"Последний изученный стих: {poem[1]}\nАвтор: {poem[2]}") self.cur.execute("""SELECT AVG(wrong_ratio) FROM poem""") avg = round(self.cur.fetchone()[0], 2) - print(avg) self.avgRatio.setText(f"Средний коэффициент правильности за все стихи: {avg}") + self.backButton.clicked.connect(self.exit_to_main_menu) + + def exit_to_main_menu(self): + self.con.close() + self.hide() + main.Main().show()