3 #include "searchdialog.h"
7 SearchDialog::SearchDialog(QWidget *parent): Dyalog(parent)
10 setWindowTitle(tr("Search the Web"));
11 setAttribute(Qt::WA_DeleteOnClose, false);
13 QLabel *titleLabel = new QLabel(tr("Title:"), this);
14 title = new QLineEdit(this);
15 QLabel *authorLabel = new QLabel(tr("Author:"), this);
16 author = new QLineEdit(this);
18 addWidget(titleLabel);
20 addWidget(authorLabel);
23 addButton(tr("Search"), this, SLOT(accept()));
26 Search::Query SearchDialog::query()
30 ret.title = title->text();
31 ret.author = author->text();
32 qDebug() << ret.title << ret.author;