#include "widget1.h" Widget1::Widget1(QWidget *parent) : QWidget(parent) { setFixedSize(800,600); line_edit = new QLineEdit("请输入网址: ",this); label = new QLabel(this); label->setText("label 占位"); line_edit->setFixedSize(800,50); label->setFixedSize(800,540); label->move(0,60); }