QT的线程开启方式有俩种方法 方法一: 1.派生QThread类,重写父类的run函数.派生对象调用strat()函数; 二方法: 1.派生出一个QObject的子类,再创建一个QThread对象; 2.把需要在线程运行的函数写在QObject的子类的槽中; 3通过QObject的子类的对象move ...
分类:
编程语言 时间:
2020-01-22 14:48:49
阅读次数:
122
1 //冒泡排序 2 void bubbleSorte(int* arr, int len) 3 { 4 for (int i = 0; i < len - 1; i++) 5 { 6 for (int j = 0; j < len - 1 - i; j++) 7 { 8 if (arr[j] > ...
分类:
编程语言 时间:
2020-01-22 14:44:45
阅读次数:
94
Given any string of N (≥) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as: h d e l l r ...
分类:
其他好文 时间:
2020-01-22 14:29:27
阅读次数:
98
1、前提条件:安装好ubuntu18.04操作系统(1、可通过虚拟机安装 2、或者安装一个真正的ubuntu18.04操作系统) 2、下载Qt安装包,下载地址如下: http://download.qt.io/archive/qt/ 我选择的是5.14 Linux版的 qt-opensource-l ...
分类:
系统相关 时间:
2020-01-22 13:10:19
阅读次数:
138
Given a binary tree root and an integer target, delete all the leaf nodes with value target. Note that once you delete a leaf node with value target, ...
分类:
其他好文 时间:
2020-01-22 11:06:54
阅读次数:
64
开发环境:Windows 10 x64 + Qt 5.12.2 确认环境配置没问题(PATH) 准备步骤: 新建文件夹Hello并在内部新建一个文本hello.cpp, 内容如下: #include <QtWidgets\QApplication> #include<QtWidgets\QLabel ...
分类:
其他好文 时间:
2020-01-22 11:03:02
阅读次数:
106
Given a positive integer num consisting only of digits 6 and 9. Return the maximum number you can get by changing at most one digit (6 becomes 9, and ...
分类:
其他好文 时间:
2020-01-22 10:56:58
阅读次数:
75
斐波那契数列。题意很简单,求出斐波那契数列里面第N个数。这个题有好几个思路,分别是迭代,递归和动态规划。虽然是个基础题但是涉及到的思路还是比较全面的,故而都列出来。例子, Example 1: Input: 2Output: 1Explanation: F(2) = F(1) + F(0) = 1 ...
分类:
其他好文 时间:
2020-01-22 10:40:54
阅读次数:
60
目录 1、单曲线输入和绘图 1、单曲线输入和绘图 1 #include "cv_plot.h" 2 #include "ui_cv_plot.h" 3 #include <QFileDialog> //for getOpenFileName() 4 #include <QDebug> 5 6 CV_ ...
分类:
编程语言 时间:
2020-01-21 23:31:51
阅读次数:
125
2017-06-22 周四 大雨 北京 院里新建作图类,继承自QCUstomPlot类因为需要同时作8张图,都要单坐标缩放的功能,因此想干脆新建一个类,继承自QCUstomPlot,把需要的功能都加上。类名取为QCUstomPlotPlus,最终成功版类代码如下://声明。explicit是为了禁止... ...
分类:
其他好文 时间:
2020-01-21 23:24:54
阅读次数:
365