added screenshot

edited buttons
This commit is contained in:
arcan1s 2014-03-02 04:41:08 +04:00
parent e969be6b89
commit 8c9904ac4b
5 changed files with 2 additions and 8 deletions

View File

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

View File

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@ -27,16 +27,12 @@ PasswdWidget::PasswdWidget(MainWindow *wid)
ui(new Ui::PasswdWidget) ui(new Ui::PasswdWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
cancelButton = ui->buttonBox->button(QDialogButtonBox::Cancel);
okButton = ui->buttonBox->button(QDialogButtonBox::Ok);
createActions(); createActions();
} }
PasswdWidget::~PasswdWidget() PasswdWidget::~PasswdWidget()
{ {
delete cancelButton;
delete okButton;
delete ui; delete ui;
} }
@ -52,8 +48,8 @@ void PasswdWidget::keyPressEvent(QKeyEvent *pressedKey)
void PasswdWidget::createActions() void PasswdWidget::createActions()
{ {
connect(ui->lineEdit, SIGNAL(returnPressed()), this, SLOT(passwdApply())); connect(ui->lineEdit, SIGNAL(returnPressed()), this, SLOT(passwdApply()));
connect(cancelButton, SIGNAL(clicked(bool)), this, SLOT(cancel())); connect(ui->buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked(bool)), this, SLOT(cancel()));
connect(okButton, SIGNAL(clicked(bool)), this, SLOT(passwdApply())); connect(ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked(bool)), this, SLOT(passwdApply()));
} }

View File

@ -47,8 +47,6 @@ private slots:
private: private:
MainWindow *parent; MainWindow *parent;
Ui::PasswdWidget *ui; Ui::PasswdWidget *ui;
QPushButton *cancelButton;
QPushButton *okButton;
// ESC pressed event // ESC pressed event
void keyPressEvent(QKeyEvent *pressedKey); void keyPressEvent(QKeyEvent *pressedKey);
void createActions(); void createActions();