From e65ec8b70d85b81001beda11ea4d12d8ffeeba72 Mon Sep 17 00:00:00 2001 From: Alex Borsch <55529391+alexborsch@users.noreply.github.com> Date: Wed, 30 Sep 2020 20:49:34 +0300 Subject: [PATCH] Update browser_tabbed.py add reload shorcuts --- browser_tabbed/browser_tabbed.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser_tabbed/browser_tabbed.py b/browser_tabbed/browser_tabbed.py index 3cbbcd6..e96f4c6 100644 --- a/browser_tabbed/browser_tabbed.py +++ b/browser_tabbed/browser_tabbed.py @@ -3,6 +3,7 @@ from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtWebEngineWidgets import * from PyQt5.QtPrintSupport import * +from PyQt5.QtWidgets import QShortcut, QLabel, QHBoxLayout import os import sys @@ -60,6 +61,11 @@ class MainWindow(QMainWindow): navtb = QToolBar("Navigation") navtb.setIconSize(QSize(16, 16)) self.addToolBar(navtb) + + '''Shortcuts''' + + self.shortcut_open = QShortcut(QKeySequence('F5'), self) + self.shortcut_open.triggered.connect(lambda: self.tabs.currentWidget().reload()) back_btn = QAction(QIcon(os.path.join('images', 'arrow-180.png')), "Back", self) back_btn.setStatusTip("Back to previous page")