mirror of
https://github.com/logos-storage/logos-storage-app-skeleton.git
synced 2026-06-14 04:19:25 +00:00
Add dialog
This commit is contained in:
parent
ce470f4c52
commit
242e3fc135
32
app/AboutDialog.cpp
Normal file
32
app/AboutDialog.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
// AboutDialog.cpp
|
||||
#include "AboutDialog.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
setWindowTitle("About Logos Storage UI");
|
||||
setFixedSize(300, 220);
|
||||
|
||||
auto *layout = new QVBoxLayout(this);
|
||||
|
||||
auto *logo = new QLabel(this);
|
||||
logo->setPixmap(
|
||||
QPixmap(":/images/assets/logos.png")
|
||||
.scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation)
|
||||
);
|
||||
logo->setAlignment(Qt::AlignCenter);
|
||||
|
||||
auto *text = new QLabel(
|
||||
"<b>Logos Storage UI</b><br>"
|
||||
"Version 1.0.0",
|
||||
this
|
||||
);
|
||||
text->setAlignment(Qt::AlignCenter);
|
||||
text->setTextFormat(Qt::RichText);
|
||||
|
||||
layout->addWidget(logo);
|
||||
layout->addWidget(text);
|
||||
}
|
||||
8
app/AboutDialog.h
Normal file
8
app/AboutDialog.h
Normal file
@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include <QDialog>
|
||||
|
||||
class AboutDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AboutDialog(QWidget *parent = nullptr);
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user