摘要: 1 void CircleWidget::paintEvent(QPaintEvent * event) 2 { 3 QPainter painter(this); 4 5 int wight = this->width(); 6 int heigth = this->height(); 7 8 if (m_timers==0) 9 ... 阅读全文
posted @ 2017-09-21 21:29 唯一诺 阅读(1540) 评论(1) 推荐(0)
摘要: 1 ////////////////////////////////////////// #include "test9_2a.h" 2 #include "M_win.h" 3 4 Test9_2A::Test9_2A(QWidget *parent) 5 : QMainWindow(parent) 6 { 7 8 ui.setupUi(this); ... 阅读全文
posted @ 2017-09-19 22:26 唯一诺 阅读(507) 评论(0) 推荐(0)
摘要: 1.QString filepath = QFileDialog::getOpenFileName(this, GBK::ToUnicode("选择文件")); //返回打开的文件的路径; 2.QDialog // 对话框类; 3.QTimer //定时器类; 定时器事件函数:virtual voi 阅读全文
posted @ 2017-09-19 19:55 唯一诺 阅读(318) 评论(0) 推荐(0)
摘要: 在面向对象的C++语言中,虚函数(virtual function)是一个非常重要的概念。 什么是虚函数: 虚函数是指一个类中你希望重载的成员函数 ,当你用一个 基类指针或引用 指向一个继承类对象的时候,调用一个虚函数时, 实际调用的是继承类的版本。 ——摘自MSDN 举例: 但是结果却是: 阅读全文
posted @ 2017-09-18 20:26 唯一诺 阅读(120601) 评论(4) 推荐(18)
摘要: Test7_5A::Test7_5A(QWidget *parent) : QMainWindow(parent){ ui.setupUi(this); m_searchwin = new SearchWindows(this); m_searchwin->setWindowFlags(Qt::Wi 阅读全文
posted @ 2017-09-18 18:19 唯一诺 阅读(318) 评论(0) 推荐(0)
摘要: char const* filename="D:/hello.txt"; 路径名使用的是“/”或者使用 转义字符“\\”; "fopen", FILE *fp=fopen(char const *name,char const mode); e.g:FILE *fp = fopen(filename 阅读全文
posted @ 2017-09-17 22:37 唯一诺 阅读(516) 评论(0) 推荐(0)
摘要: filename=c:/test/abc.text filename=c:\\test\\abc.test "\\"为转义字符; feof();函数检测文件是否已经到达末尾(EOF); 阅读全文
posted @ 2017-09-17 08:33 唯一诺 阅读(229) 评论(0) 推荐(0)
摘要: 转载:http://blog.csdn.net/tianzhaixing2013/article/details/51811608 Ctrl+E,D —-格式化全部代码 Ctrl+E,F —-格式化选中的代码 CTRL + SHIFT + B生成解决方案 CTRL + F7 生成编译 CTRL + O 打开文件 CTRL + SHIFT + O打开项目 CTRL + SHIFT + ... 阅读全文
posted @ 2017-09-16 20:44 唯一诺 阅读(307) 评论(0) 推荐(0)
摘要: 恢复内容开始 环境:Visual Studio 2015 环境:Visual Studio 2015 问题:代码中出现中文后会带下划线,不舒服 解决办法。 1.安装完Visual Assist X后会在VS2015的菜单栏出现VAssistX这个选项,单击展开,选择Visual AssistX Op 阅读全文
posted @ 2017-09-01 20:35 唯一诺 阅读(1067) 评论(0) 推荐(0)
摘要: 1.参考此文档:QT5.6+vs2015配置; 2.出现乱码问题时候 在头文件上加入: 阅读全文
posted @ 2017-08-28 16:38 唯一诺 阅读(1051) 评论(0) 推荐(0)