- 博客(5)
- 收藏
- 关注
原创 Qt qmke命令学习
Makefile文件:qmake、cmake根据cmakelists.txt 、pro文件、sln文件生成;或手写cmakelists.txt、pro文件、sln文件:需要手写或IDE生成make命令:根据Makefile文件执行编译和链接Qt中的应用:qmake工具:Qt中根据pro文件用来生成Makefile文件,这个Makefile文件中额外定义了moc工具生成文件的编译规则参考:作者:辉常哥链接:https://www.zhihu.com/question/27455963/answe
2021-04-21 10:54:40
554
原创 Qt的事件分发机制
Qt的事件分发机制1.Qt事件来源之一是由以下调用产生这两个调用指定了事件的接收者receiver和事件event[static] bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event)[static] void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority = Qt::NormalEventPriority)2.事
2020-10-28 15:26:56
471
原创 选择排序c++实现
选择排序C++实现及运行结果void SelectSort(int arr[],int len){ if (arr == NULL) return; int i = 0; for (int i; i <len; i++) { int j = i + 1; int temp = i; for (int j; j <len; j++) { if (arr[j] < arr[temp]) { temp = j; } } if (t
2020-10-20 19:54:57
110
原创 快速排序c++实现
快排c++实现及编译结果#include <iostream>using namespace std;void quickSort(int left, int right, int* arr){ if (arr == NULL) return; if (left >= right) return; int i = left, j = right; int base = arr[i]; while (i < j) { while (arr[i] &l
2020-10-20 19:14:59
119
原创 Qt父子窗口之间的坐标系转换
Qt父子窗口之间的坐标系转换基础知识:QMyLabel m_label;//关系1:m_label有自己的父窗口,假设为m_widget;QPoint posChild(0,0);//此点坐标在m_label坐标系中 关系2:m_label是posChild的父窗口QPoint posParent=m_label->mapToParent(posChild);//得到的posParent是posChild在m_widget中的坐标上面的函数可以理解为:posParent=posChild+m
2020-09-27 16:00:00
1504
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人