Skip to content
Permalink
Browse files

[dbmanager] Fix exception on older Qt builds

Fixes #19309

(cherry-picked from 9d8202b)
  • Loading branch information
nyalldawson committed Jun 29, 2018
1 parent 4a5170c commit c9f23fdf2a7ee4b848a3fa449cfaeba1aed6c200
Showing with 5 additions and 1 deletion.
  1. +5 −1 python/plugins/db_manager/dlg_sql_window.py
@@ -96,7 +96,11 @@ def __init__(self, iface, db, parent=None):
self.btnCancel.setText(self.tr("Cancel (ESC)"))
self.btnCancel.setEnabled(False)
self.btnCancel.clicked.connect(self.executeSqlCanceled)
self.btnCancel.setShortcut(QKeySequence.Cancel)
try:
self.btnCancel.setShortcut(QKeySequence.Cancel)
except AttributeError:
# QKeySequence.Cancel only available in Qt >= 5.6
pass
self.progressBar.setEnabled(False)
self.progressBar.setRange(0, 100)
self.progressBar.setValue(0)

0 comments on commit c9f23fd

Please sign in to comment.
You can’t perform that action at this time.