Update browser.py

some addition
This commit is contained in:
Alex Borsch 2020-09-30 22:40:15 +03:00 committed by GitHub
parent e65ec8b70d
commit ed4b429de2
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
@ -58,7 +59,10 @@ class MainWindow(QMainWindow):
navtb = QToolBar("Navigation")
navtb.setIconSize(QSize(16, 16))
self.addToolBar(navtb)
self.shortcut_open = QShortcut(QKeySequence('F5'), self)
self.shortcut_open.triggered.connect(self.browser.reload)
back_btn = QAction(QIcon(os.path.join('images', 'arrow-180.png')), "Back", self)
back_btn.setStatusTip("Back to previous page")
back_btn.triggered.connect(self.browser.back)