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

16 lines
348 B
C++
Raw Permalink Normal View History

2023-08-08 17:47:59 +08:00
#include "widget1.h"
Widget1::Widget1(QWidget *parent) : QWidget(parent)
{
setWindowTitle("题目1");
setFixedSize(800,600);
btn = new QPushButton("按钮",this);
btn->setFixedSize(200,100);
btn->move(10,10);
connect(btn,&QPushButton::clicked,[&]()->void{
qDebug()<<"I Love Qt5 Widget";
});
}