Skip to content

Commit

Permalink
Update loading widget
Browse files Browse the repository at this point in the history
  • Loading branch information
chardoncs committed Jun 10, 2023
1 parent 7336aa5 commit d597bd3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 7 additions & 4 deletions loadingwidget.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#include "loadingwidget.hpp"

#include <QLabel>

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();
}
8 changes: 8 additions & 0 deletions loadingwidget.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef LOADINGWIDGET_HPP
#define LOADINGWIDGET_HPP

#include <QLabel>
#include <QPointer>
#include <QVBoxLayout>
#include <QWidget>

class LoadingWidget : public QWidget
Expand All @@ -9,6 +12,11 @@ class LoadingWidget : public QWidget
public:
explicit LoadingWidget(QWidget *parent = nullptr);

private:
QPointer<QVBoxLayout> layout;

QPointer<QLabel> label;

signals:

};
Expand Down

0 comments on commit d597bd3

Please sign in to comment.