• QT day1


    1. MyWidget::MyWidget(QWidget *parent)
    2. : QWidget(parent)
    3. {
    4. this->resize(536,412);
    5. this->setWindowTitle("QQ");
    6. this->setWindowIcon(QIcon("E:\\qq ls\\pictrue\\pictrue\\qq.png"));
    7. this->setStyleSheet("background-color:white");
    8. //this->setWindowFlag(Qt::FramelessWindowHint);
    9. QMovie *mv = new QMovie(this);
    10. mv->setFileName("E:\\qq ls\\pictrue\\pictrue\\qq2.gif");
    11. mv->start();
    12. QLabel *lab2 = new QLabel(this);
    13. lab2->resize(536,220);
    14. lab2->setMovie(mv);
    15. lab2->setScaledContents(true);
    16. QLabel *lab1 = new QLabel(this);
    17. lab1->resize(30,30);
    18. lab1->move(15,10);
    19. lab1->setPixmap(QPixmap("E:\\qq ls\\pictrue\\pictrue\\6.png"));
    20. lab1->setStyleSheet("background-color:transparent");
    21. lab1->setScaledContents(true);
    22. QLabel *lab3 =new QLabel(this);
    23. lab3->move(120,220);
    24. lab3->setPixmap(QPixmap("E:\\qq ls\\pictrue\\pictrue\\4.png"));
    25. lab3->setScaledContents(true);
    26. QLabel *lab4 =new QLabel(this);
    27. lab4->move(120,260);
    28. lab4->setPixmap(QPixmap("E:\\qq ls\\pictrue\\pictrue\\5.png"));
    29. lab4->setScaledContents(true);
    30. QLineEdit *ed1 = new QLineEdit(this);
    31. ed1->move(160,220);
    32. ed1->resize(230,30);
    33. ed1->setPlaceholderText("账号");
    34. QLineEdit *ed2 = new QLineEdit(this);
    35. ed2->move(160,260);
    36. ed2->resize(230,30);
    37. ed2->setPlaceholderText("密码");
    38. ed2->setEchoMode(QLineEdit::Password);
    39. QPushButton *btn = new QPushButton("登 录",this);
    40. btn->move(140,330);
    41. btn->resize(250,50);
    42. btn->setStyleSheet("background-color:rgb(0,190,255);border-radius:10px;color:white");
    43. QMovie *mv1 =new QMovie(this);
    44. mv1->setFileName("E:\\qq ls\\pictrue\\pictrue\\7.gif");
    45. mv1->start();
    46. QLabel *lab5 = new QLabel(this);
    47. lab5->resize(99,87);
    48. lab5->move(220,100);
    49. lab5->setMovie(mv1);
    50. lab5->setStyleSheet("border-radius:40");
    51. lab5->setScaledContents(true);
    52. QCheckBox *cb1 = new QCheckBox(this);
    53. cb1->resize(20,20);
    54. cb1->move(120,300);
    55. QLabel *lab6 =new QLabel("自动登录",this);
    56. lab6->resize(65,20);
    57. lab6->move(140,300);
    58. lab6->setStyleSheet("color:grey");
    59. QCheckBox *cb2 = new QCheckBox(this);
    60. cb2->resize(20,20);
    61. cb2->move(220,300);
    62. QLabel *lab7 =new QLabel("记住密码",this);
    63. lab7->resize(65,20);
    64. lab7->move(240,300);
    65. lab7->setStyleSheet("color:grey");
    66. QLabel *lab8 =new QLabel("找回密码",this);
    67. lab8->resize(65,20);
    68. lab8->move(335,300);
    69. lab8->setStyleSheet("background-color:transparent;color:grey");
    70. QLabel *lab9 =new QLabel("注册账号",this);
    71. lab9->resize(65,20);
    72. lab9->move(15,380);
    73. lab9->setStyleSheet("background-color:transparent;color:grey");
    74. QLabel *lab10 = new QLabel(this);
    75. lab10->resize(45,45);
    76. lab10->move(480,360);
    77. lab10->setPixmap(QPixmap("E:\\qq ls\\pictrue\\pictrue\\10.png"));
    78. lab10->setStyleSheet("background-color:transparent");
    79. lab10->setScaledContents(true);
    80. }

  • 相关阅读:
    [MICROSAR Adaptive] --- Execution Management
    LeetCode 363 期周赛
    人工智能第2版学习——知情搜索3
    【Apache Spark 】第 10 章使用 MLlib 进行机器学习
    Python 算法设计(2) - 大数运算 - 基于字符串的数字运算和进位
    lwip_网卡
    2、关于网络中接受的数据如何编码和反编码的思考以及实现
    [MAUI]在.NET MAUI中实现可拖拽排序列表
    各省、市转移支付数据集-分专项转移支付、一般转移支付、税收返还
    Spring Boot启动流程
  • 原文地址:https://blog.csdn.net/benbai_v/article/details/133869207