mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:44:01 +02:00
Un-default the "OK" button so that we can press enter on the URL field.
This commit is contained in:
parent
9421af9f10
commit
082ff760d6
2 changed files with 13 additions and 0 deletions
|
@ -50,10 +50,20 @@ AttachmentsDialog::AttachmentsDialog() :
|
|||
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok);
|
||||
layout->addWidget(buttons);
|
||||
connect(buttons, SIGNAL(accepted()), SLOT(deleteLater()));
|
||||
_ok = buttons->button(QDialogButtonBox::Ok);
|
||||
|
||||
setMinimumSize(600, 600);
|
||||
}
|
||||
|
||||
void AttachmentsDialog::setVisible(bool visible) {
|
||||
QDialog::setVisible(visible);
|
||||
|
||||
// un-default the OK button
|
||||
if (visible) {
|
||||
_ok->setDefault(false);
|
||||
}
|
||||
}
|
||||
|
||||
void AttachmentsDialog::updateAttachmentData() {
|
||||
QVector<AttachmentData> data;
|
||||
for (int i = 0; i < _attachments->count() - 1; i++) {
|
||||
|
|
|
@ -30,6 +30,8 @@ public:
|
|||
|
||||
AttachmentsDialog();
|
||||
|
||||
virtual void setVisible(bool visible);
|
||||
|
||||
public slots:
|
||||
|
||||
void updateAttachmentData();
|
||||
|
@ -41,6 +43,7 @@ private slots:
|
|||
private:
|
||||
|
||||
QVBoxLayout* _attachments;
|
||||
QPushButton* _ok;
|
||||
};
|
||||
|
||||
/// A panel controlling a single attachment.
|
||||
|
|
Loading…
Reference in a new issue