• 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. }

  • 相关阅读:
    【Android】系统源码下载及编译和android studio导入
    Redis基础命令汇总,看这篇就够了
    Django DRF 自动生成接口文档
    Linux下安装mongodb详细教程
    rust包
    传奇开服教程:传奇开服在哪些网站打广告?传奇发布站打广告技巧
    OpenWRT、Yocto 、Buildroot和Ubuntu有什么区别
    java中Collection.stream()流用法详解
    Python基础
    Python中 utf-8和gbk以及unicode编码
  • 原文地址:https://blog.csdn.net/jihnbjkn/article/details/139663375