another workaround for the KDE accelerator issue

This commit is contained in:
Damien Elmes 2017-07-31 15:48:34 +10:00
parent 96c737f24f
commit 412d37fc13

View File

@ -143,7 +143,9 @@ class ButtonedDialog(QMessageBox):
if but == "Help": if but == "Help":
# FIXME stop dialog closing? # FIXME stop dialog closing?
openHelp(self.help) openHelp(self.help)
return self.clickedButton().text() txt = self.clickedButton().text()
# work around KDE 'helpfully' adding accelerators to button text of Qt apps
return txt.replace("&", "")
def setDefault(self, idx): def setDefault(self, idx):
self.setDefaultButton(self.buttons[idx]) self.setDefaultButton(self.buttons[idx])