界面设计
MyProWin :: MyProWin ( QWidget * parent) : QMainWindow ( parent)
{ this -> setFixedSize ( 644 , 493 ) ; this -> setWindowTitle ( "QQ" ) ; this -> setWindowIcon ( QIcon ( "C:/Users/10988/Downloads/pictrue/pictrue/qq.png" ) ) ; this -> setStyleSheet ( "background-color:white" ) ; this -> setWindowFlag ( Qt:: FramelessWindowHint) ; QLabel * upper_lab = new QLabel ( this ) ; upper_lab-> resize ( 644 , 290 ) ; upper_lab-> setScaledContents ( true ) ; QMovie * upper_mv = new QMovie ( "C:/Users/10988/Downloads/pictrue/pictrue/qq2.gif" ) ; upper_lab-> setMovie ( upper_mv) ; upper_mv-> start ( ) ; QLabel * qq_upper_lab = new QLabel ( this ) ; qq_upper_lab-> move ( 30 , 20 ) ; qq_upper_lab-> setScaledContents ( true ) ; qq_upper_lab-> setPixmap ( QPixmap ( "C:/Users/10988/Downloads/pictrue/pictrue/QQicon.png" ) ) ; qq_upper_lab-> resize ( 50 , 50 ) ; qq_upper_lab-> setStyleSheet ( "background-color:transparent" ) ; QLabel * account_lab = new QLabel ( this ) ; account_lab-> move ( 145 , 260 ) ; account_lab-> setScaledContents ( true ) ; account_lab-> resize ( 25 , 30 ) ; account_lab-> setPixmap ( QPixmap ( "C:/Users/10988/Downloads/pictrue/pictrue/QQaccount.png" ) ) ; QLabel * pwd_lab = new QLabel ( this ) ; pwd_lab-> move ( 145 , 310 ) ; pwd_lab-> setScaledContents ( true ) ; pwd_lab-> resize ( 25 , 30 ) ; pwd_lab-> setPixmap ( QPixmap ( "C:/Users/10988/Downloads/pictrue/pictrue/qqpwd.png" ) ) ; QLabel * img_lab = new QLabel ( this ) ; img_lab-> move ( 270 , 140 ) ; img_lab-> setScaledContents ( true ) ; img_lab-> resize ( 100 , 100 ) ; img_lab-> setStyleSheet ( "background-color:transparent" ) ; img_lab-> setPixmap ( QPixmap ( "C:/Users/10988/Downloads/pictrue/pictrue/boy_h.png" ) ) ; QLabel * fpwd_lab = new QLabel ( this ) ; fpwd_lab-> move ( 440 , 350 ) ; fpwd_lab-> setScaledContents ( true ) ; fpwd_lab-> setText ( "找回密码" ) ; QLabel * reg_lab = new QLabel ( this ) ; reg_lab-> move ( 30 , 450 ) ; reg_lab-> setScaledContents ( true ) ; reg_lab-> setText ( "注册账号" ) ; QLabel * qr_lab = new QLabel ( this ) ; qr_lab-> move ( 580 , 450 ) ; qr_lab-> setScaledContents ( true ) ; qr_lab-> resize ( 25 , 25 ) ; qr_lab-> setPixmap ( QPixmap ( "C:/Users/10988/Downloads/pictrue/pictrue/qr.png" ) ) ; QLineEdit * account_le = new QLineEdit ( this ) ; account_le-> setPlaceholderText ( "QQ号码/手机/邮箱" ) ; account_le-> resize ( 345 , 30 ) ; account_le-> move ( 175 , 260 ) ; QLineEdit * pwd_le = new QLineEdit ( this ) ; pwd_le-> setEchoMode ( QLineEdit:: Password) ; pwd_le-> resize ( 345 , 30 ) ; pwd_le-> move ( 175 , 310 ) ; QCheckBox * login_ck = new QCheckBox ( this ) ; login_ck-> move ( 145 , 350 ) ; login_ck-> setText ( "自动登录" ) ; QCheckBox * pwd_ck = new QCheckBox ( this ) ; pwd_ck-> move ( 300 , 350 ) ; pwd_ck-> setText ( "记住密码" ) ; QPushButton * login_bnt = new QPushButton ( this ) ; login_bnt-> move ( 145 , 400 ) ; login_bnt-> resize ( 370 , 60 ) ; login_bnt-> setText ( "登录" ) ; login_bnt-> setStyleSheet ( "background-color:rgb(70,127,231)" ) ;
}
思维导图