06 2021 档案

摘要:1.主窗口添加布局. 都知道在QWidget中,进行布局很简单,直接类似如下即可: QPushButton *firstButton = new QPushButton(); QPushButton *secondButton = new QPushButton(); QPushButton *la 阅读全文
posted @ 2021-06-24 14:48 大力的成长 阅读(3055) 评论(0) 推荐(0)
摘要:获取带日期的时间,使用QDateTime类QDateTime current_date_time =QDateTime::currentDateTime();QString current_date =current_date_time.toString("yyyy.MM.dd hh:mm:ss.z 阅读全文
posted @ 2021-06-18 14:37 大力的成长 阅读(102) 评论(0) 推荐(0)
摘要:前言QVariant这个类很神奇,或者说方便。很多时候,需要几种不同的数据类型需要传递,如果用结构体,又不大方便,容器保存的也只是一种数据类型,而QVariant则可以统统搞定。 介绍帮助文档上说:The QVariant class acts like a union for the most c 阅读全文
posted @ 2021-06-16 13:19 大力的成长 阅读(814) 评论(0) 推荐(0)
摘要:C++规定:对象的成员变量的初始化动作发生在进入构造函数本体之前。 #include <iostream> #include <string> using namespace std; class STU { public: /* name为初始化,sex和age为赋值 */ STU(string 阅读全文
posted @ 2021-06-15 14:41 大力的成长 阅读(651) 评论(0) 推荐(0)
摘要:参考:QT学习:给label添加图片资源_zjy900507的博客-CSDN博客 阅读全文
posted @ 2021-06-10 15:58 大力的成长 阅读(168) 评论(0) 推荐(0)