From 11099c7bee4fc11fc1b59e67b322a502b616c2b4 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Sat, 5 Feb 2022 12:58:38 -0700 Subject: [PATCH] Add a refresh button. --- src/MainView.cpp | 2 ++ src/MainView.ui | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/MainView.cpp b/src/MainView.cpp index cf84ecc..f879451 100644 --- a/src/MainView.cpp +++ b/src/MainView.cpp @@ -38,6 +38,7 @@ MainView::MainView(QWidget *parent) : QWidget(parent) // Get handles for the views. backButtonPointer = mainViewUi.backButton; forwardButtonPointer = mainViewUi.forwardButton; + QPushButton *refreshButtonPointer = mainViewUi.refreshButton; QPushButton *homeButtonPointer = mainViewUi.homeButton; urlLineEditPointer = mainViewUi.urlLineEdit; javaScriptButtonPointer = mainViewUi.javaScript; @@ -60,6 +61,7 @@ MainView::MainView(QWidget *parent) : QWidget(parent) // Setup the URL bar buttons. connect(backButtonPointer, SIGNAL(clicked()), webEngineViewPointer, SLOT(back())); connect(forwardButtonPointer, SIGNAL(clicked()), webEngineViewPointer, SLOT(forward())); + connect(refreshButtonPointer, SIGNAL(clicked()), webEngineViewPointer, SLOT(reload())); connect(homeButtonPointer, SIGNAL(clicked()), this, SLOT(goHome())); connect(javaScriptButtonPointer, SIGNAL(clicked()), this, SLOT(toggleJavaScript())); diff --git a/src/MainView.ui b/src/MainView.ui index c7afeb8..632ae6f 100644 --- a/src/MainView.ui +++ b/src/MainView.ui @@ -32,6 +32,7 @@ + @@ -103,6 +104,26 @@ + + + + + + + + + + 24 + 24 + + + + + true + + + + -- 2.45.2