天宫鹤

2022年12月25日

解决QML QtGraphicalEffects is not Installed

摘要: 将import QtGraphicalEffects 1.0改为: import Qt5Compat.GraphicalEffects 参考网址:https://stackoverflow.com/questions/68292911/qml-qtgraphicaleffects-is-not-in 阅读全文

posted @ 2022-12-25 16:45 GoGrid 阅读(1113) 评论(0) 推荐(0) 编辑

2022年12月18日

Windows给pip换源极大提高pip install速度

摘要: 1.打开appdata文件夹,在资源管理器的地址栏输入%appdata%后回车, 或者win+r打开命令运行,然后输入%appdata%也可以到该文件目录 2.新建文件夹和文件 新建一个名为pip的文件夹 在pip文件夹里面新建名为pip.ini文件 将下面信息添加在pip.ini文件内: [glo 阅读全文

posted @ 2022-12-18 13:57 GoGrid 阅读(194) 评论(0) 推荐(0) 编辑

2022年12月16日

Qt应用程序使用QFileDialog前可以如此设置更通用更规范噢(一个直接拿来用的静态函数)

摘要: static void initializeImageFileDialog(QFileDialog &dialog, QFileDialog::AcceptMode acceptMode){ static bool firstDialog = true; //设置文件对话框的打开目录为系统图片标准位 阅读全文

posted @ 2022-12-16 17:27 GoGrid 阅读(82) 评论(0) 推荐(0) 编辑

2022年12月10日

Qt应用程序三步引用动态链接库DLL可简化为两步

摘要: 1、在.pro中添加对 lib 的引用 INCLUDEPATH += $$PWD/include LIBS += $$PWD/lib*.a 其中,include目录下包含两个头文件,*_global.h和*.h。 2、在引用文件中,添加动态链接库头文件(*.h)的引用。 3、将动态链接库文件(*.d 阅读全文

posted @ 2022-12-10 19:18 GoGrid 阅读(433) 评论(0) 推荐(0) 编辑

2022年11月21日

Qt应用程序使用拖放打开文件

摘要: 1.在mainwindow.h文件中添加函数声明: protected: void dragEnterEvent(QDragEnterEvent *event) override; // 拖动进入事件 void dropEvent(QDropEvent *event) override; // 放下 阅读全文

posted @ 2022-11-21 20:36 GoGrid 阅读(171) 评论(0) 推荐(0) 编辑

2022年11月12日

【Qt】警告Missing reference in range-for with non trivial type

摘要: Missing reference in range-for with non trivial type (QUrl) 警告 原始代码如下: for (auto url : urls) { QSharedPointer<QNetworkReply> reply(qnam.get(QNetworkRe 阅读全文

posted @ 2022-11-12 16:56 GoGrid 阅读(107) 评论(0) 推荐(0) 编辑

统计开始目录及其子目录下的指定类型文件中的单词(使用多线程、并发多线程(mappedReduced函数)进行速度对比)

摘要: #include <QList> #include <QMap> #include <QTextStream> #include <QString> #include <QStringList> #include <QDir> #include <QElapsedTimer> #include <Q 阅读全文

posted @ 2022-11-12 08:25 GoGrid 阅读(27) 评论(0) 推荐(0) 编辑

2022年11月6日

static_cast和dynamic_cast详解(转载,不错的文章就转载了,作为收藏吧)

摘要: 派生类不仅有自己的方法和属性,同时它还包括从父类继承来的方法和属性。当我们从派生类向基类转换时,不管用传统的c语言还是c++转换方式都可以百分百转换成功。但是可怕是向下转换类型,也就是我们从基类向派生类转换,当我们采用传统的C语言和c++转换时,就会出现意想不到的情况,因为转换后派生类自己的方法和属 阅读全文

posted @ 2022-11-06 18:40 GoGrid 阅读(112) 评论(0) 推荐(0) 编辑

解决OpenCV 4描述符匹配器(cv::DescriptorMatcher)create函数的参数类型问题

摘要: 1.在OpenCV 4.6.0中函数签名如下: static Ptr<DescriptorMatcher> cv::DescriptorMatcher::create(const String & descriptorMatcherType) static Ptr<DescriptorMatcher 阅读全文

posted @ 2022-11-06 17:31 GoGrid 阅读(566) 评论(0) 推荐(0) 编辑

2022年11月5日

特征匹配(提取和匹配描述符FeatureDetector&DescriptorExtractor)

摘要: void featureMatch() { cv::TickMeter meter; meter.start(); Mat image1 = imread(MYPICTUREPATH "lena.jpg"); Mat image2 = imread(MYPICTUREPATH "lena_face. 阅读全文

posted @ 2022-11-05 20:48 GoGrid 阅读(154) 评论(0) 推荐(0) 编辑

导航