• QT_day1


    1. #include "mywidget.h"
    2. MyWidget::MyWidget(QWidget *parent)
    3. : QWidget(parent)
    4. {
    5. //窗口大小
    6. this->resize(851,648);
    7. this->setFixedSize(851,648);
    8. //窗口背景色
    9. this->setStyleSheet("background:rgb(255,255,255,)");
    10. //窗口名称
    11. this->setWindowTitle("TIM");
    12. //窗口图标
    13. this->setWindowIcon(QIcon("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 185540.png"));
    14. //左侧图片
    15. QLabel *lab1=new QLabel(this);
    16. lab1->setPixmap(QPixmap("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 185621.png"));
    17. //qq登录的lable
    18. QLabel *lab2=new QLabel(this);
    19. lab2->move(575,156);
    20. lab2->setPixmap(QPixmap("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 185827.png"));
    21. //微信登录的label
    22. QLabel *lab3=new QLabel(this);
    23. lab3->move(690,156);
    24. lab3->setPixmap(QPixmap("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 185900.png"));
    25. //账号输入
    26. QLineEdit *edit1 = new QLineEdit(this);
    27. edit1->move(542,300);
    28. edit1->resize(280,50);
    29. edit1->setPlaceholderText("QQ号码/手机/邮箱");
    30. //登录按钮
    31. QPushButton *btn1 = new QPushButton(this);
    32. QIcon icon1("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 192900.png");
    33. btn1->setIcon(icon1);
    34. btn1->move(790,435);
    35. //密码输入
    36. QLineEdit *edit2 = new QLineEdit(this);
    37. edit2->move(542,370);
    38. edit2->resize(280,50);
    39. edit2->setPlaceholderText("密码");
    40. edit2->setEchoMode(QLineEdit::Password);
    41. //找回密码按钮
    42. QPushButton *btn2 = new QPushButton(this);
    43. btn2->setText("找回密码");
    44. btn2->move(750,545);
    45. btn2->resize(65,22);
    46. //注册账号按钮
    47. QPushButton *btn3 = new QPushButton(this);
    48. btn3->setText("注册账号");
    49. btn3->move(750,585);
    50. btn3->resize(65,22);
    51. //记住密码复选框
    52. QCheckBox *box1 = new QCheckBox(this);
    53. box1->setText("记住密码");
    54. box1->resize(85,22);
    55. box1->move(555,545);
    56. //自动登录复选框
    57. QCheckBox *box2 = new QCheckBox(this);
    58. box2->setText("自动登录");
    59. box2->resize(85,22);
    60. box2->move(555,585);
    61. }
    62. MyWidget::~MyWidget()
    63. {
    64. }

  • 相关阅读:
    LeetCode 101. 对称二叉树
    Shopee买家通系统之如何注册虾皮账号
    三个本地组策略的设置实例
    Jtti:新加坡云服务器怎么部署javaweb
    【Unity】加速Unity编辑器模式启动时间
    Redis 面霸篇:从高频问题透视核心原理
    浏览器输入url地址,到页面渲染发生了什么
    有没有好用的视频剪辑软件分享?
    一文彻底理解什么是同步和异步!
    初识C++(三)
  • 原文地址:https://blog.csdn.net/jihnbjkn/article/details/139663375