this->setCentralWidget(centerWindow);
label1 = new QLabel("显示");
label2 = new QLabel("结果");
QHBoxLayout * h1 = new QHBoxLayout;
h1->addWidget(label1);
h1->addWidget(label2);
label1->setMaximumHeight(15);
label2->setMaximumHeight(15);
h1->setStretch(0,2);
h1->setStretch(1,1);
showEdit = new QTextEdit;
resultEdit = new QTextEdit;
QHBoxLayout * h2 = new QHBoxLayout;
h2->addWidget(showEdit);
h2->addWidget(resultEdit);
showEdit->setMaximumHeight(30);
resultEdit->setMaximumHeight(30);
showEdit->setReadOnly(true);
resultEdit->setReadOnly(true);
h2->setStretch(0,2);
h2->setStretch(1,1);
//第三行按钮
backBt = new QPushButton("Back");
removeBt = new QPushButton("CE");
clearBt = new QPushButton("CLS");
sumBt = new QPushButton("+");
backBt->setMinimumHeight(50);
removeBt->setMinimumHeight(50);
clearBt->setMinimumHeight(50);
sumBt->setMinimumHeight(50);
QHBoxLayout * h3 = new QHBoxLayout;
h3->addWidget(backBt);
h3->addWidget(removeBt);
h3->addWidget(clearBt);
h3->addWidget(sumBt);
sevenBt = new QPushButton("7");
- 3 -
评论0
最新资源