1234567891011121314151617181920212223242526272829303132 |
- #include "DialogEditComment.h"
- DialogEditComment::DialogEditComment(const QString& strComm, QWidget *parent)
- : QDialog(parent)
- {
- ui.setupUi(this);
- m_strComment = strComm;
- ui.textComment->setText(m_strComment);
- // 槽函数
- connect(ui.okButton, SIGNAL(clicked()), this, SLOT(onButtonOkClicked()));
- connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
- }
- DialogEditComment::~DialogEditComment()
- {
- }
- /// <summary>
- /// OK按钮
- /// </summary>
- void DialogEditComment::onButtonOkClicked()
- {
- m_strComment = ui.textComment->toPlainText();
- this->accept();
- }
|