m_textEdit = new QTextEdit;
m_locationLabel = new QLabel;
- m_checkBox = new QCheckBox(tr("Publish in Facebook"));
+ m_checkBox = new QCheckBox(tr("Publish on Facebook"));
- m_okButton = new QPushButton(tr("Send"));
- m_buttonBox = new QDialogButtonBox(Qt::Vertical);
- m_buttonBox->addButton(m_okButton, QDialogButtonBox::ActionRole);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Vertical);
+ QPushButton *sendButton = buttonBox->addButton(QDialogButtonBox::Ok);
+ QPushButton *cancelButton = buttonBox->addButton(QDialogButtonBox::Cancel);
+ sendButton->setText(tr("Send"));
QFormLayout *form = new QFormLayout();
form->addRow(new QLabel(tr("Location:")), m_locationLabel);
scrollArea->setWidget(groupBox);
scrollArea->setWidgetResizable(true);
gridLayout->addWidget(scrollArea, 0, 0, 2, 1);
- gridLayout->addWidget(m_buttonBox, 0, 1, 1, 1);
+ gridLayout->addWidget(buttonBox, 0, 1, 1, 1);
setLayout(gridLayout);
- connect(m_okButton, SIGNAL(clicked()), this, SLOT(sendUpdate()));
+ connect(sendButton, SIGNAL(clicked()), this, SLOT(sendUpdate()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
scrollArea->show();
}