qfedu-qt-level/homework-day1/widget6.cpp

19 lines
396 B
C++
Raw Normal View History

2023-08-08 17:47:59 +08:00
#include "widget6.h"
Widget6::Widget6(QWidget *parent) : QWidget(parent)
{
setWindowTitle("题目5-widget6");
setFixedSize(400,600);
move(900,300);
btn = new QPushButton("隐身按钮",this);
btn->setFixedSize(200,100);
btn->move(10,10);
connect(btn,&QPushButton::clicked,[&]()->void{
emit this->stealth(); // 发送隐身信号
});
}