当前位置: 首页 > 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.lryc.cn/news/591139.html

相关文章:

  • Unity VR多人手术模拟恢复2:客户端移动同步问题分析与解决方案
  • Kafka 配置参数详解:ZooKeeper 模式与 KRaft 模式对比
  • mac OS上docker安装zookeeper
  • 第二十三篇文档格式互转大师:Python实现PDF、Word、图片、Markdown的高效转换!你的万能转换器!
  • SpringMVC @ResponseBody注解详解
  • 如何选择合规的上门按摩系统
  • Maven详细解
  • 3D Gaussian Splatting (3DGS) 从入门到精通:安装、训练与常见问题全解析
  • 【Bluedroid】btif_a2dp_sink_init 全流程源码解析
  • 【Leetcode】栈和队列算法题(逆波兰表达式、二叉树层序遍历、最小栈、栈的压入弹出序列)
  • CrewAI与LangGraph:下一代智能体编排平台深度测评
  • onenote千年老bug,字体bug (calibri微软雅黑) 的解决
  • 深度学习损失函数详解 | Binary Cross Entropy(二元交叉熵)原理 + 数学推导 + Python实现
  • 中科米堆CASAIM三维激光扫描仪用于注塑件3d扫描逆向建模
  • 【Linux】第一个小程序—进度条
  • 黑色风格音乐播放器网站模板(附完整源码)
  • 前端防复制实战指南:5 种主流方案效果对比与实现
  • 北京-4年功能测试2年空窗-报培训班学测开-第五十三天
  • 数据库管理-第349期 Oracle DB 23.9新特性一览(20250717)
  • 【37】MFC入门到精通——MFC中 CString 数字字符串 转 WORD ( CString, WORD/int 互转)
  • 【华为】交换机vlan互访实验
  • 边缘智能革命:嵌入式机器学习如何让万物“思考”
  • CephFS 和 SSHFS 挂载指南:从配置到排错
  • SQL一些关于存储过程和使用的总结
  • 并发事务~
  • Selector的用法
  • 一台显示器上如何快速切换两台电脑主机?
  • Adobe Photoshop:数字图像处理的终极工具指南
  • JavaScript进阶篇——第八章 原型链、深浅拷贝与原型继承全解析
  • 爬虫逆向:一篇文章掌握 Hopper 的详细使用(macOS 和 Linux 反汇编程序:对可执行文件进行静态分析)