mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 19:41:19 -06:00
MainWindow: Add Ctrl+Return shortcut for executing SQL and add tooltips
Add the Ctrl+Return shortcut for executing the current SQL again. This needs to be done using C++ code instead of setting it in Qt Designer because setting multiple shortcuts in the latter means defining a key sequence row. Also add the keyboard shortcuts to the tooltips of the buttons as they didn't appear anywhere in the program.
This commit is contained in:
@@ -79,6 +79,11 @@ void MainWindow::init()
|
||||
ui->dbTreeWidget->setColumnHidden(1, true);
|
||||
ui->dbTreeWidget->setColumnWidth(0, 300);
|
||||
|
||||
// Add keyboard shortcuts
|
||||
QList<QKeySequence> shortcuts = ui->actionExecuteSql->shortcuts();
|
||||
shortcuts.push_back(QKeySequence(tr("Ctrl+Return")));
|
||||
ui->actionExecuteSql->setShortcuts(shortcuts);
|
||||
|
||||
// Create the actions for the recently opened dbs list
|
||||
for(int i = 0; i < MaxRecentFiles; ++i) {
|
||||
recentFileActs[i] = new QAction(this);
|
||||
|
||||
Reference in New Issue
Block a user