4月26日作业

 myqt.cpp

this->setFixedSize(500,500);//设置固定尺寸
 //关于界面标题的函数
    qDebug()<<this->windowTitle();
    this->setWindowTitle("QQ");
//设置窗口图标
    this->setWindowIcon(QIcon(":/3.jpg"));
    //设置背景颜色
    this->setStyleSheet("background-color:skyblue;");
  //实例化一个标签,给定父组件并给定初始文本内容
    l1=new QLabel("密码",this);
    l1->move(130,300);
 l2=new QLabel("账号",this);
    l2->move(130,250);
    //实例化一个喊编辑器
    e1=new QLineEdit(this);
    e1->move(170,300);
    e1->setEchoMode(QLineEdit::Password);//设置行编辑器回显模式   设置密文模式
    e1->setPlaceholderText("请输入密码");//设置占位文本
    //实例化一个喊编辑器
    e2=new QLineEdit(this);
    e2->move(170,250);
    //e2->setEchoMode(QLineEdit::Password);//设置行编辑器回显模式   设置密文模式
    e2->setPlaceholderText("请输入账号");//设置占位文本

myqt.h

private: 
 QLabel *l1;
    QLabel *l2;
    QLineEdit *e1;
     QLineEdit *e2;

ui

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值