Update browser_tabbed.py

add reload shorcuts
This commit is contained in:
Alex Borsch 2020-09-30 20:49:34 +03:00 committed by GitHub
parent 20b3f89f2e
commit e65ec8b70d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")