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

我的开发日志:随机数小程序

文章目录

  • 前言
  • UI设计
  • 代码

前言

为什么我要设计这个程序呢?因为我要用,懒得在网上下载了,于是干脆写了一个。

UI设计

UI是我凹出来的,你们要使用,直接新建一个UI.ui文件,然后把下面的东西输进去就可以了。

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"><class>MainWindow</class><widget class="QMainWindow" name="MainWindow"><property name="geometry"><rect><x>0</x><y>0</y><width>283</width><height>365</height></rect></property><property name="windowTitle"><string>MainWindow</string></property><widget class="QWidget" name="centralwidget"><widget class="QLabel" name="label"><property name="geometry"><rect><x>20</x><y>10</y><width>81</width><height>21</height></rect></property><property name="font"><font><pointsize>12</pointsize></font></property><property name="text"><string>起始数字:</string></property></widget><widget class="QSpinBox" name="SPstart"><property name="geometry"><rect><x>130</x><y>10</y><width>131</width><height>22</height></rect></property><property name="minimum"><number>-999999999</number></property><property name="maximum"><number>999999999</number></property></widget><widget class="QLabel" name="label_2"><property name="geometry"><rect><x>20</x><y>50</y><width>81</width><height>21</height></rect></property><property name="font"><font><pointsize>12</pointsize></font></property><property name="text"><string>结束数字:</string></property></widget><widget class="QSpinBox" name="SPend"><property name="geometry"><rect><x>130</x><y>50</y><width>131</width><height>22</height></rect></property><property name="minimum"><number>-999999999</number></property><property name="maximum"><number>999999999</number></property></widget><widget class="QPushButton" name="Bstart"><property name="geometry"><rect><x>50</x><y>120</y><width>81</width><height>31</height></rect></property><property name="text"><string>生成</string></property></widget><widget class="QTextBrowser" name="textN"><property name="geometry"><rect><x>30</x><y>170</y><width>221</width><height>101</height></rect></property></widget><widget class="QCheckBox" name="checkBox"><property name="geometry"><rect><x>170</x><y>130</y><width>71</width><height>16</height></rect></property><property name="text"><string>去重</string></property></widget><widget class="QPushButton" name="Bcopy"><property name="geometry"><rect><x>100</x><y>280</y><width>81</width><height>31</height></rect></property><property name="text"><string>复制</string></property></widget><widget class="QSpinBox" name="SPquantity"><property name="geometry"><rect><x>130</x><y>90</y><width>131</width><height>22</height></rect></property><property name="minimum"><number>-999999999</number></property><property name="maximum"><number>999999999</number></property></widget><widget class="QLabel" name="label_3"><property name="geometry"><rect><x>20</x><y>90</y><width>81</width><height>21</height></rect></property><property name="font"><font><pointsize>12</pointsize></font></property><property name="text"><string>生成数量:</string></property></widget></widget><widget class="QMenuBar" name="menubar"><property name="geometry"><rect><x>0</x><y>0</y><width>283</width><height>23</height></rect></property></widget><widget class="QStatusBar" name="statusbar"/><action name="action"><property name="text"><string>1</string></property></action></widget><resources/><connections/>
</ui>

然后这个UI的效果应该是这样的:
UI图片

代码

这玩意儿搞完了以后,就这样新建文件夹及文件:
在这里插入图片描述

新建完以后,就写基本框架了

http://www.dtcms.com/a/283954.html

相关文章:

  • redis中间件
  • 手撕Spring底层系列之:后置处理器“PostProcessor”
  • Vmware虚拟机使用仅主机模式共享物理网卡访问互联网
  • 研报复现|格雷厄姆成长股内在价值策略
  • Error: llama runner process has terminated: exit status 2
  • 实习Last Day研二Last Day
  • 纯前端html实现图片坐标与尺寸(XY坐标及宽高)获取
  • JavaScript进阶篇——第七章 原型与构造函数核心知识
  • 深度学习 -- 初步认识Torch
  • vue中的this.$set
  • 在分布式系统中,如何保证缓存与数据库的数据一致性?
  • LVS实验
  • 板凳-------Mysql cookbook学习 (十一--------12)
  • LVS集群
  • Docker实战:使用Docker部署IT工具箱Team·IDE
  • Android15系统实现刷机防呆功能
  • Flutter在Android studio运行出现Error: Entrypoint is not a Dart file
  • C++网络编程 2.TCP套接字(socket)编程详解
  • 微信小程序列表数据上拉加载,下拉刷新
  • ASP .NET Core 8实现实时Web功能
  • Python 网络爬虫 —— 提交信息到网页
  • AI算法之图像识别与分类
  • 电力载波通信技术(PLC)发展全解析:从历史演进到未来趋势
  • RabbitMQ概述和工作模式
  • 永磁同步电机MTPA与MTPV曲线具体仿真实现
  • Python学习之——序列化与反序列化
  • 常用的100个opencv函数
  • [RAG] LLM 交互层 | 适配器模式 | 文档解析器(`docling`库, CNN, OCR, OpenCV)
  • 加速度传感器方向校准方法
  • RGBA图片格式转换为RGB格式(解决convert转换的失真问题)