-
Notifications
You must be signed in to change notification settings - Fork 0
/
dialogabout.cpp
42 lines (32 loc) · 962 Bytes
/
dialogabout.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "dialogabout.h"
#include "ui_dialogabout.h"
#include <QFile>
#include <QTextStream>
#include <QMessageBox>
DialogAbout::DialogAbout(QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogAbout)
{
ui->setupUi(this);
QFile file("C:\\Users\\eric.roach\\Documents\\roc\\LICENSE");
if(!file.open(QIODevice::ReadOnly))
QMessageBox::information(0,"info",file.errorString());
QTextStream in(&file);
QList<QTextBrowser *> kids = ui->tabWidget->widget(0)->findChildren<QTextBrowser *>();
kids[0]->setText(in.readAll());
}
DialogAbout::~DialogAbout()
{
delete ui;
}
void DialogAbout::on_pushButton_clicked()
{
QFile file("C:\\Users\\eric.roach\\Documents\\roc\\LICENSE");
if(!file.open(QIODevice::ReadOnly))
QMessageBox::information(0,"info",file.errorString());
QTextStream in(&file);
ui->textBrowser->setText(in.readAll());
}
void DialogAbout::on_textEdit_textChanged()
{
}