当前位置:网站首页>QT常见概念-1
QT常见概念-1
2022-07-06 19:03:00 【帅气滴点C】
目录
1.时间日期相关:
1.1 数据类型
- QTime:时间数据类型,表示时间,如:14:23:13。
- QDate:日期数据类型,表示日期,如:2020-4-5。
- QDateTime:日期时间数据类型,表示日期和时间,如:2020-03-23 08:12:43。
所以Time 就是时间;Date 就是日期;DateTime就是时间+日期
1.2 相关组件
- QTimeEdit:编辑和显示时间的组件。
- QDateEdit:编辑和显示日期的组件。
- QDateTimeEdit:编辑和显示日期时间的组件。
- QCalendarWidget:用日历形式选择日期的组件。
QDateEdit 和 QTimeEdit 都是从 QDateTimeEdit 继承的,实现日期或时间的特定显示功能。实际上,QDateEdit 和 QTimeEdit 的显示功能都可以通过 QDateTimeEdit 实现,只需设置属性即可。
QDateTimeEdit 类的主要属性如下:
datetime:日期时间。
date:日期,设置 datetime 时会自动改变 date,同样,设置 date 时,也会自动改变 datetime 里的日期。
time:时间,设置 datetime 时会自动改变 time,同样,设置 time 时,也会自动改变 datetime 里的时间。
maximumDateTime、 minimumDateTime:最大、最小日期时间。
maximumDate、minimumDate:最大、最小日期。
maximumTime、minimumTime:最大、最小时间。
currentSection:当前输入光标所在的时间日期数据段,是枚举类型 QDateTimeEdit::Section。QDateTimeEdit 显示日期时间数据时分为多个段,单击编辑框右侧的上下按钮可修改当前段的值。如输入光标在YearSection段,就修改“年”的值。
currentSectionIndex:用序号表示的输入光标所在的段。
calendarPopup:是否允许弹出一个日历选择框。当取值为 true 时,右侧的输入按钮变成与 QComboBox 类似的下拉按钮,单击按钮时出现一个日历选择框,用于在日历上选择日期。对于 QTimeEdit,此属性无效。
displayFormat:显示格式,日期时间数据的显示格式,例如设置为“yyyy-MM-dd HH:mm:ss”,一个日期时间数据就显示为“2020-11-02 08:23:46”
2. listview和listwiget相关:
3.打包相关:
- setup.py
- 假如我在本机开发一个程序,需要用到python的redis、mysql模块以及自己编写的redis_run.py模块。我怎么实现在服务器上去发布该系统,如何实现依赖模块和自己编写的模块redis_run.py一起打包,实现一键安装呢?同时将自己编写的redis_run.py模块以exe文件格式安装到python的全局执行路径C:\Python27\Scripts下呢?在这种应用场景下,pip工具似乎派不上了用场,只能使用python的构建工具setup.py了,使用此构建工具可以实现上述应用场景需求,只需在 setup.py 文件中写明依赖的库和版本,然后到目标机器上使用python setup.py install安装。
4. 常见函数:
QApplication:
- QApplication作为整个GUI应用的入口点,想必是完成各种初始化。即入口函数。
边栏推荐
- 软件测试——Jmeter接口测试之常用断言
- 1--新唐nuc980 NUC980移植 UBOOT,从外部mx25l启动
- wireshark安装
- 牛客编程题--必刷101之双指针篇
- Yyds dry goods inventory # solve the real problem of famous enterprises: maximum difference
- MATLB|具有储能的经济调度及机会约束和鲁棒优化
- 服装企业部署MES管理系统的五个原因
- Lombok同时使⽤@Data和@Builder 的坑
- [C # notes] reading and writing of the contents of text files
- Use of pgpool II and pgpooladmin
猜你喜欢

Fundamentals of process management

MySQL --- 常用函数 - 字符串函数

一文读懂Faster RCNN

FLIR blackfly s usb3 industrial camera: how to use counters and timers

本周 火火火火 的开源项目!

6-6漏洞利用-SSH安全防御

1--新唐nuc980 NUC980移植 UBOOT,从外部mx25l启动

dotConnect for DB2数据提供者
![[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files](/img/20/f7fc2204ca165dcea4af25cb054e9b.png)
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files

AWS学习笔记(一)
随机推荐
The third season of ape table school is about to launch, opening a new vision for developers under the wave of going to sea
Integerset of PostgreSQL
1 -- Xintang nuc980 nuc980 porting uboot, starting from external mx25l
MySQL --- 常用函数 - 字符串函数
postgresql之整體查詢大致過程
服装企业部署MES管理系统的五个原因
安全交付工程师
投资的再思考
The empirical asset pricing package (EAP) can be installed through pypi
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
实施MES管理系统时,哪些管理点是需要注意的
一文读懂Faster RCNN
Fundamentals of process management
MFC Windows 程序设计[147]之ODBC数据库连接(附源码)
leetcode:736. LISP syntax parsing [flowery + stack + status enumaotu + slots]
[leetcode]Search for a Range
Work of safety inspection
6-6 vulnerability exploitation SSH security defense
如何从0到1构建32Core树莓派集群
Data connection mode in low code platform (Part 1)