mirror of
https://github.com/pythonguis/pythonguis-examples.git
synced 2025-01-13 16:42:55 +08:00
Update browser_tabbed.py
add reload shorcuts
This commit is contained in:
parent
20b3f89f2e
commit
e65ec8b70d
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user