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

浙公网安备 33010602011771号