Update AddressBook Example

Adding parent to QDialog
As proposed on qt-project.org forum:
http://qt-project.org/forums/viewthread/41686/

Change-Id: Ib66d24e4afd0be803a1080c37bc6c0a189844786
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
This commit is contained in:
Steven Ceuppens 2014-04-21 21:07:22 +02:00 committed by The Qt Project
parent d7d12bc1eb
commit c0b75d3e6b
3 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ AddressBook::AddressBook(QWidget *parent)
previousButton->setEnabled(false);
//! [instantiating FindDialog]
dialog = new FindDialog;
dialog = new FindDialog(this);
//! [instantiating FindDialog]
connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));

View File

@ -80,7 +80,7 @@ AddressBook::AddressBook(QWidget *parent)
//! [tooltip 2]
saveButton->setEnabled(false);
dialog = new FindDialog;
dialog = new FindDialog(this);
connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));

View File

@ -80,7 +80,7 @@ AddressBook::AddressBook(QWidget *parent)
exportButton->setToolTip(tr("Export as vCard"));
exportButton->setEnabled(false);
dialog = new FindDialog;
dialog = new FindDialog(this);
connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));