-
Notifications
You must be signed in to change notification settings - Fork 1
/
searchwindow.cpp
42 lines (34 loc) · 1.16 KB
/
searchwindow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "searchwindow.h"
SearchWindow::SearchWindow(QWidget *parent)
:PostureWindow(parent)
{
BuildBottomRight();
}
SearchWindow::~SearchWindow()
{
}
void SearchWindow::BuildBottomRight()
{
m_qlNotify = new QLabel("Search key words that you are interested in...",m_qwBottomRight);
m_qlNotify->setObjectName("search");
m_qleSearchKey = new QLineEdit(m_qwBottomRight);
m_qleSearchKey->setPlaceholderText("for example: magic");
m_qleSearchKey->setObjectName("searchKey");
m_qpbSearch = new QPushButton(m_qwBottomRight);
m_qpbSearch->setIcon(QIcon(":/img/Resources/searchbutton.png"));
m_qpbSearch->setIconSize(QSize(ICONWIDTH, ICONHEIGHT));
m_qpbSearch->setObjectName("search");
QVBoxLayout *mainLayout = new QVBoxLayout();
QHBoxLayout *searchLayout = new QHBoxLayout();
searchLayout->addStretch();
searchLayout->addWidget(m_qleSearchKey);
searchLayout->addWidget(m_qpbSearch);
searchLayout->addStretch();
searchLayout->setSpacing(0);
mainLayout->addSpacing(SPACE*10);
mainLayout->addWidget(m_qlNotify, 0, Qt::AlignCenter);
mainLayout->addSpacing(SPACE);
mainLayout->addLayout(searchLayout);
mainLayout->addStretch();
m_qwBottomRight->setLayout(mainLayout);
}