7月7号作业

登录界面

ui->setupUi(this);
    //qDebug("%s","hello world!\n");

    this->setFixedSize(647,400);

    this->setWindowFlag(Qt::FramelessWindowHint,0);
    this->setWindowTitle("QQ");
    this->setWindowIcon(QIcon("E:\\Users\\Blue\\icon_z8w8m9orsdk\\QQ1.png"));

    //this->setStyleSheet("background-color:#24b0ff;color:black;");//skyblue
    this->setStyleSheet("background-color:#fff;color:black;");
    //this->setWindowOpacity(0.9);
    //this->move(30,50);

    QPushButton *btn1=new QPushButton;
    btn1->setParent(this);
    btn1->setText("登录");

    btn1->resize(250,50);
    btn1->move(197,265);
    btn1->setIcon(QIcon("E:\\Users\\Blue\\icon_z8w8m9orsdk\\denglu_1.png"));
    btn1->setStyleSheet("background-color:#24b0ff;border-radius:6px;color:black;font-size:20px");

    QPushButton *btn2=new QPushButton(this);
    btn2->setText("注册");
    btn2->resize(250,40);
    btn2->move(197,340);
    //btn2->setEnabled(false);
    btn2->setIcon(QIcon("E:\\Users\\Blue\\icon_z8w8m9orsdk\\QQ2.png"));
    btn2->setStyleSheet("background-color:#24b0ff;border-radius:5px;color:black;");

    QLabel *lab1=new QLabel(this);
    lab1->resize(25,25);
    //lab1->setStyleSheet("");
    qDebug() << lab1->text();
    lab1->move(197,90);

    QLabel *lab2=new QLabel(this);
    lab2->resize(lab1->size());
    lab2->move(197,150);

    lab1->setPixmap(QPixmap("E:\\Users\\Blue\\icon_z8w8m9orsdk\\QQ1.png"));
    lab1->setScaledContents(1);
    lab2->setPixmap(QPixmap("E:\\Users\\Blue\\icon_z8w8m9orsdk\\suo.png"));
    lab2->setScaledContents(1);


    QLineEdit *edit1 = new QLineEdit(this);
    edit1->resize(220,35);
    edit1->move(227,90);
    edit1->setStyleSheet("border:none;border-bottom:1px solid black;");
    edit1->setPlaceholderText("账号");

    QLineEdit *edit2 = new QLineEdit(this);

    edit2->resize(edit1->size());
    edit2->move(227,150);
    edit2->setPlaceholderText("密码");
    edit2->setStyleSheet("border:none;border-bottom:1px solid black;");
    edit2->setEchoMode(QLineEdit::Password);
    qDebug() << edit2->text();

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值