14 int main (
int argc,
char** argv)
16 QApplication app(argc, argv);
19 QLabel* plblDisplay =
new QLabel;
20 plblDisplay->setFrameStyle(QFrame::Box | QFrame::Raised);
21 plblDisplay->setLineWidth(2);
22 plblDisplay->setFixedHeight(50);
24 QLabel* plblText =
new QLabel(
"&Text:");
25 QLineEdit* ptxt =
new QLineEdit;
26 plblText->setBuddy(ptxt);
27 QObject::connect(ptxt, SIGNAL(textChanged(
const QString&)),
28 plblDisplay, SLOT(setText(
const QString&))
32 QLabel* plblPassword =
new QLabel(
"&Password:");
33 QLineEdit* ptxtPassword =
new QLineEdit;
34 plblPassword->setBuddy(ptxtPassword);
35 ptxtPassword->setEchoMode(QLineEdit::Password);
36 QObject::connect(ptxtPassword, SIGNAL(textChanged(
const QString&)),
37 plblDisplay, SLOT(setText(
const QString&))
41 QVBoxLayout* pvbxLayout =
new QVBoxLayout;
42 pvbxLayout->addWidget(plblDisplay);
43 pvbxLayout->addWidget(plblText);
44 pvbxLayout->addWidget(ptxt);
45 pvbxLayout->addWidget(plblPassword);
46 pvbxLayout->addWidget(ptxtPassword);
47 wgt.setLayout(pvbxLayout);
int main(int argc, char **argv)