Skip to content

Commit 24965d3

Browse files
committed
chore:add space shortcut for dialog
1 parent 379e902 commit 24965d3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/gameRecordPop.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
from PyQt5 import QtCore, QtGui
22
from ui.ui_record_pop import Ui_Form
33
from ui.uiComponents import RoundQDialog
4+
from PyQt5.QtWidgets import QShortcut
5+
from PyQt5.QtGui import QKeySequence
46

57
class ui_Form(Ui_Form):
68
def __init__(self, r_path, del_items: list, pb_bbbv, nf_items, parent):
79
self.Dialog = RoundQDialog(parent)
810
self.setupUi(self.Dialog)
911
self.Dialog.setWindowIcon (QtGui.QIcon (str(r_path.with_name('media').joinpath('cat.ico'))))
1012

13+
# 空格键快捷键关闭这个窗口。回车不需要设置,在ui文件中已经设置。
14+
QShortcut(QKeySequence("Space"), self.Dialog, activated=self.pushButton.click)
15+
1116
for i in nf_items:
1217
eval(f"self.label_{i}.setText('NF ' + self.label_{i}.text())")
1318
for i in del_items:

uiFiles/ui_about.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ height:36px;
6060
}</string>
6161
</property>
6262
<property name="currentIndex">
63-
<number>0</number>
63+
<number>2</number>
6464
</property>
6565
<property name="usesScrollButtons">
6666
<bool>true</bool>
@@ -260,7 +260,7 @@ height:36px;
260260
<item>
261261
<widget class="QLabel" name="label_6">
262262
<property name="text">
263-
<string>致谢:濮天羿、向飞宇、钟言、翁逸杰、张砷镓</string>
263+
<string>致谢:濮天羿、向飞宇、钟言、翁逸杰、张砷镓、Thomas Kolar</string>
264264
</property>
265265
<property name="wordWrap">
266266
<bool>true</bool>

0 commit comments

Comments
 (0)