您的位置:首页 > 健康 > 养生 > Qt 6.13

Qt 6.13

2024/10/6 10:31:50 来源:https://blog.csdn.net/Johan1111/article/details/139671372  浏览:    关键词:Qt 6.13

作业:

#include "mywidget.h"mywidget::mywidget(QWidget *parent): QWidget(parent)
{this->setStyleSheet("background-color:white");this->resize(600,600);this->setWindowFlag(Qt::FramelessWindowHint);this->setWindowTitle("华清远见登录");//    QLabel *lab1=new QLabel(this);
//    lab1->resize(95,55);
//    lab1->setStyleSheet("background-color:green");
//    lab1->setPixmap(QPixmap("C:\\Users\\ASUS\\Desktop\\微信图片_20240613194429.png"));QLabel *lab2=new QLabel(this);//lab2->move(100,100);lab2->resize(600,200);lab2->setStyleSheet("background-color:green");lab2->setPixmap(QPixmap("E:\\1.QQ\\1774024653\\FileRecv\\pictrue\\logo.png"));//   QMovie *mov=new QMovie("‪‪C:\\Users\\ASUS\\Desktop\\zz.gif");
//    lab2->setMovie(mov);
//    mov->start();lab2->setScaledContents(true);QLineEdit *edit1=new QLineEdit(this);  //设置行编辑edit1->move(150,350);edit1->resize(300,30);edit1->setPlaceholderText("请输入账号名/注册");edit1->setEchoMode(QLineEdit::Normal);QLineEdit *edit2=new QLineEdit(this);edit2->move(150,390);edit2->resize(300,30);edit2->setPlaceholderText("密码");edit2->setEchoMode(QLineEdit::Password);QLabel *la1=new QLabel(this);la1->resize(30,30);la1->move(120,350);//la1->setStyleSheet("background-color:green");la1->setPixmap(QPixmap("‪E:\\1.QQ\\1774024653\\FileRecv\\pictrue\\login.png"));la1->setScaledContents(1);QPushButton *btn1=new QPushButton("登录",this);btn1->move(350,440);btn1->resize(100,30);btn1->setStyleSheet("background-color:pink");QPushButton *btn2=new QPushButton("取消",this);btn2->move(150,440);btn2->resize(100,30);btn2->setStyleSheet("background-color:yellow");}mywidget::~mywidget()
{
}

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com