mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-29 16:14:19 +01:00
29 lines
535 B
C++
29 lines
535 B
C++
|
#include "textdialog.h"
|
||
|
#include "ui_textdialog.h"
|
||
|
|
||
|
TextDialog::TextDialog(QWidget *parent, const QString &txt ) :
|
||
|
QDialog(parent),
|
||
|
ui(new Ui::TextDialog)
|
||
|
{
|
||
|
ui->setupUi(this);
|
||
|
ui->textEdit->append( txt );
|
||
|
}
|
||
|
|
||
|
TextDialog::~TextDialog()
|
||
|
{
|
||
|
delete ui;
|
||
|
}
|
||
|
|
||
|
void TextDialog::on_buttonBox_accepted()
|
||
|
{
|
||
|
ret = ui->textEdit->document()->toPlainText();
|
||
|
}
|
||
|
|
||
|
QString TextDialog::GetText( QWidget *parent, const QString &txt )
|
||
|
{
|
||
|
TextDialog d( parent, txt );
|
||
|
if( !d.exec() )
|
||
|
return QString();
|
||
|
return d.ret;
|
||
|
}
|