From d597bd3e210fd1ee9ffcd080da72f0267f8997b7 Mon Sep 17 00:00:00 2001 From: chardon55 Date: Sat, 10 Jun 2023 09:10:13 +0800 Subject: [PATCH] Update loading widget --- loadingwidget.cpp | 11 +++++++---- loadingwidget.hpp | 8 ++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/loadingwidget.cpp b/loadingwidget.cpp index 4d53b45..b3e8a12 100644 --- a/loadingwidget.cpp +++ b/loadingwidget.cpp @@ -1,14 +1,17 @@ #include "loadingwidget.hpp" -#include - LoadingWidget::LoadingWidget(QWidget *parent) : QWidget{parent} { - QLabel *label = new QLabel("Initializing browser window...", this); + layout = new QVBoxLayout(this); + + label = new QLabel("Loading web page...", this); label->setAlignment(Qt::AlignmentFlag::AlignCenter); - label->setFont(QFont("sans-serif", 16)); + label->setFont(QFont("sans-serif", 12)); + + layout->addWidget(label); this->resize(400, 100); this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint); + this->raise(); } diff --git a/loadingwidget.hpp b/loadingwidget.hpp index 7291a3c..94e45d1 100644 --- a/loadingwidget.hpp +++ b/loadingwidget.hpp @@ -1,6 +1,9 @@ #ifndef LOADINGWIDGET_HPP #define LOADINGWIDGET_HPP +#include +#include +#include #include class LoadingWidget : public QWidget @@ -9,6 +12,11 @@ class LoadingWidget : public QWidget public: explicit LoadingWidget(QWidget *parent = nullptr); +private: + QPointer layout; + + QPointer label; + signals: };