diff --git a/icons.qrc b/icons.qrc
index 5f7b0c6..0e21a94 100644
--- a/icons.qrc
+++ b/icons.qrc
@@ -30,6 +30,8 @@
icons/homepage_dark.svg
icons/category_active_dark.svg
icons/category_active.svg
+ icons/refresh-page-dark.svg
+ icons/refresh-page.svg
Logo-Spark.png
diff --git a/icons/refresh-page-dark.svg b/icons/refresh-page-dark.svg
new file mode 100644
index 0000000..38b924c
--- /dev/null
+++ b/icons/refresh-page-dark.svg
@@ -0,0 +1,54 @@
+
+
diff --git a/icons/refresh-page.svg b/icons/refresh-page.svg
new file mode 100644
index 0000000..bab5516
--- /dev/null
+++ b/icons/refresh-page.svg
@@ -0,0 +1,52 @@
+
+
diff --git a/widget.cpp b/widget.cpp
index 27041e6..aa03897 100644
--- a/widget.cpp
+++ b/widget.cpp
@@ -263,6 +263,7 @@ void Widget::setTheme(bool isDark,QColor color)
// ui->scrollArea->setStyleSheet("background-color:#252525");
ui->label_show->setStyleSheet("background-color:#252525");
ui->pushButton_return->setIcon(QIcon(":/icons/icons/category_active_dark.svg"));
+ ui->pushButton_refresh->setIcon(QIcon(":/icons/icons/refresh-page-dark.svg"));
}else {
// 亮色模式
themeIsDark=false;
@@ -273,6 +274,7 @@ void Widget::setTheme(bool isDark,QColor color)
// ui->scrollArea->setStyleSheet("background-color:#F8F8F8");
ui->label_show->setStyleSheet("background-color:#F8F8F8");
ui->pushButton_return->setIcon(QIcon(":/icons/icons/category_active.svg"));
+ ui->pushButton_refresh->setIcon(QIcon(":/icons/icons/refresh-page.svg"));
}
main_color=color;
m_loadweb->setTheme(themeIsDark,color);
@@ -713,6 +715,14 @@ void Widget::on_pushButton_return_clicked()
// }
}
+void Widget::on_pushButton_refresh_clicked()
+{
+ if(ui->stackedWidget->currentIndex() == 2) //如果在详情页面要重新触发UrlChanged
+ emit ui->webEngineView->urlChanged(ui->webEngineView->url());
+ else
+ ui->webEngineView->reload();
+}
+
void Widget::on_comboBox_server_currentIndexChanged(const QString &arg1)
{
if(configCanSave){
diff --git a/widget.h b/widget.h
index 6a0fb44..ea609f4 100644
--- a/widget.h
+++ b/widget.h
@@ -75,7 +75,9 @@ private slots:
void on_webEngineView_loadFinished(bool arg1);
-public:
+ void on_pushButton_refresh_clicked();
+
+ public:
QUrl url;
diff --git a/widget.ui b/widget.ui
index 19697a2..b159311 100644
--- a/widget.ui
+++ b/widget.ui
@@ -61,35 +61,35 @@
5
- -
+
-
视频播放
- -
+
-
下载列表
- -
+
-
系统工具
- -
+
-
主题美化
- -
+
-
音乐欣赏
@@ -131,7 +131,7 @@
- -
+
-
Qt::Horizontal
@@ -147,14 +147,21 @@
- -
+
-
编程开发
- -
+
-
+
+
+ 办公学习
+
+
+
+ -
@@ -162,6 +169,9 @@
16777215
+
+ 回到分类
+
@@ -171,13 +181,6 @@
- -
-
-
- 办公学习
-
-
-
-
@@ -191,21 +194,21 @@
- -
+
-
阅读翻译
- -
+
-
其他应用
- -
+
-
@@ -215,35 +218,35 @@
- -
+
-
图形图像
- -
+
-
游戏娱乐
- -
+
-
社交沟通
- -
+
-
网络应用
- -
+
-
@@ -275,6 +278,26 @@
+ -
+
+
+
+ 40
+ 16777215
+
+
+
+ 重新加载
+
+
+
+
+
+
+ :/icons/icons/refresh-page.svg:/icons/icons/refresh-page.svg
+
+
+
@@ -287,7 +310,7 @@
0
- 2
+ 0
@@ -308,6 +331,9 @@
-
+
+ Qt::DefaultContextMenu
+
about:blank
@@ -428,7 +454,7 @@
0
0
- 889
+ 470
854
@@ -868,8 +894,8 @@
0
0
- 851
- 323
+ 98
+ 28
@@ -999,7 +1025,7 @@
0
0
692
- 994
+ 836