标签: python pyqt pyqt5 keyboard-shortcuts
下面的代码无法激活快捷方式
print("hmmmmm",(s)) self.actionOpen.setShortcut(_translate("MainWindow", s))
打印输出为
hmmmmm Ctrl+Y
但是如果我直接给give打
print("hmmmmm",(s)) self.actionOpen.setShortcut(_translate("MainWindow", "Ctrl+Y"))
快捷方式有效