当前位置: 首页 > news >正文

QTday1

#include "mywidget.h"MyWidget::MyWidget(QWidget *parent): QWidget(parent)
{//设置窗口标题this->setWindowTitle("向日葵远程控制");//设置窗口图标this->setWindowIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\logo.png"));//设置窗口尺寸this->resize(800,548);//设置背景颜色this->setStyleSheet("background-color:#121212");//设置标签QLabel *lab1 = new QLabel(this);//设置标签大小lab1->resize(200,548);//设置标签颜色lab1->setStyleSheet("background-color:#292929");//设置按钮1QPushButton *btn1 = new QPushButton(this);btn1->resize(200,72);btn1->move(0,38);btn1->setIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\left1.png"));btn1->setIconSize(QSize(200,72));//设置按钮2QPushButton *btn2 = new QPushButton(this);btn2->resize(183,34);btn2->move(0,102);btn2->setIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\left2.png"));btn2->setIconSize(QSize(34,34));btn2->setStyleSheet("background-color:#292929;color:white");btn2->setText("远程协助");//设置按钮3QPushButton *btn3 = new QPushButton(this);btn3->resize(183,34);btn3->move(0,148);btn3->setIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\left3.png"));btn3->setIconSize(QSize(34,34));btn3->setStyleSheet("background-color:#292929;color:white");btn3->setText("设备列表");//设置按钮4QPushButton *btn4 = new QPushButton(this);btn4->resize(183,34);btn4->move(0,194);btn4->setIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\left4.png"));btn4->setIconSize(QSize(34,34));btn4->setStyleSheet("background-color:#292929;color:white");btn4->setText("多协议远控");//设置按钮5QPushButton *btn5 = new QPushButton(this);btn5->resize(183,34);btn5->move(0,240);btn5->setIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\left5.png"));btn5->setIconSize(QSize(34,34));btn5->setStyleSheet("background-color:#292929;color:white");btn5->setText("发现更多");//设置按钮6QPushButton *btn6 = new QPushButton(this);btn6->resize(183,34);btn6->move(0,286);btn6->setIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\left6.png"));btn6->setIconSize(QSize(34,34));btn6->setStyleSheet("background-color:#292929;color:white");btn6->setText("手机投屏");//设置广告标签//设置标签QLabel *lab2 = new QLabel(this);//设置标签大小lab2->resize(170,120);//设置广告图片lab2->setPixmap(QPixmap("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\advertisement.png"));//移动广告位置lab2->move(15,340);//设置按钮7QPushButton *btn7 = new QPushButton(this);btn7->resize(167,34);btn7->move(16,468);btn7->setIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\left7.png"));btn7->setIconSize(QSize(167,34));//设置按钮8QPushButton *btn8 = new QPushButton(this);btn8->resize(180,35);btn8->move(16,512);btn8->setIcon(QIcon("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\left8.png"));btn8->setIconSize(QSize(180,40));//设置标签QLabel *lab3 = new QLabel(this);//设置标签大小lab3->resize(600,213);//设置广告图片lab3->setPixmap(QPixmap("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\mid1.png"));//移动广告位置lab3->move(200,100);//创建行编辑器QLineEdit *edit1 = new QLineEdit(this);//设置显示模式edit1->setEchoMode(QLineEdit::Normal);//设置占位edit1->setPlaceholderText("请输入伙伴识别码         验证码(可为空)");//移动edit1->move(250,319);edit1->setStyleSheet("color:#E0E0E0;border-radius:5px;border:1px solid #E0E0E0");edit1->resize(325,41);//设置按钮9QPushButton *btn9 = new QPushButton(this);btn9->resize(150,40);btn9->setStyleSheet("background-color:#4e1e29;color:#E0E0E0;border-radius:5px");btn9->move(600,318);btn9->setText("连接");//设置标签QLabel *lab4 = new QLabel(this);//设置标签大小lab4->resize(165,30);//设置广告图片lab4->setPixmap(QPixmap("C:\\Users\\Hasee\\Desktop\\pictrue\\mypicture\\mid2.png"));//移动广告位置lab4->move(250,368);
}MyWidget::~MyWidget()
{
}

效果图

原软件界面

Xmind

http://www.lryc.cn/news/506376.html

相关文章:

  • SAP ALV选择列排序时弹出定义排序顺序窗口问题
  • CSS Backgrounds(背景)
  • 欧拉计划 Project Euler 27 题解
  • 迁移学习--fasttext概述
  • 【数字信号处理】数字信号处理试题及答案,离散序列,Z变换,傅里叶变换
  • CNN、RNN、LSTM和Transformer之间的区别和联系
  • springboot448教学辅助系统(论文+源码)_kaic
  • 用QT制作的倒计时软件
  • 基于 mzt-biz-log 实现接口调用日志记录
  • docker容器的安装以及用法
  • Java中的Consumer接口应该如何使用(通俗易懂图解)
  • D102【python 接口自动化学习】- pytest进阶之fixture用法
  • 从零玩转CanMV-K230(4)-小核Linux驱动开发参考
  • 上汽大通汽车CAN数据解析开发服务及技术商用领域详细解析
  • 基于SCUI的后台管理系统
  • 使用频谱分析仪:RBW,Res BW,分辨率带宽;Sweep,扫描;noise floor,底噪,如何降低底噪?
  • 项目管理工具Maven(一)
  • 阿里云ESC服务器一次性全部迁移到另一个ESC
  • 搭建分布式Kafka集群
  • 【后端面试总结】深入解析进程和线程的区别
  • java版电子招投标采购|投标|评标|竞标|邀标|评审招投标系统源码
  • SSM 赋能 Vue 助力:新锐台球厅管理系统的设计与实现的辉煌之路
  • C++ 并发专题 - C++线程同步的几种方法
  • 使用Python脚本进行编写批量根据源IP进行查询的语句用于态势感知攻击行为的搜索
  • Python中的zip/unzip:像拉拉链一样组合数据的艺术
  • 数电课设·简易数字钟(Quartus Ⅱ)
  • 大模型中RAG模型的检索过程是如何实现的?(附最佳实践资料)
  • python:用 sklearn.metrics 评价 K-Means 聚类模型
  • Spring依赖注入不同类型的数据
  • Linux大杂烩!!!