.pro文件中加上:
需要注意的:
-L 后面不能有空格!!!
-l 后面也不能有空格!!!
之前就是因为加了空格才老是出错。。。
(离了大谱)
再出错就重新构建看行不行
python根目录:

墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
1.1k累计阅读
1.2k平均单平台
已同步平台
CSDN
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄6年



QT中启动python脚本(环境配置+demo)
QT中启动python脚本一、QT环境的(一)QT_Windows_5.9下载与安装1.下载2.安装(二)环境配置二、代码实现功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章...
QT第三方库配置
第三方库,QT
QT5和python3结合你想不到坑
使用Qt5+python3实现一个word和Excel操作的一个工具,新手入坑,坑死人不偿命。 c++操作word和Excel 作为一个接触c++只有一个月的新手人员,一直想写应用的小工具,验收一下学习成果,刚好赶着项目需要,最近在修改大量的交付文档,就萌发一个用c++编写工具的想法: 网上搜索确实有很多方法,看了下网上的资料,发现对于我们这种小西米看着头痛; c++调Word是可以实现,但是没...
Qt调用Python详细过程
Qt调用Python详细过程
PySide2是 Qt 库的 Python 绑定之一
是 Qt 库的 Python 绑定之一,它为 Python 程序员提供了创建跨平台桌面应用程序的工具和功能。PySide2 是 Qt 5.x 系列的 Python 绑定,而本身是一个跨平台的图形用户界面(GUI)框架,广泛用于开发各种类型的桌面应用程序,包括多种平台(Windows、Linux、macOS)的应用。
QT调用python脚本函数(科研配置环境系列)
QT调用Python脚本函数过程,及参数传递
QT添加python解释环境
qt creator添加python解释器,实现再qt中能运行python脚本
Python GUI开发实战:掌握QT与PythonQT库
GUI(Graphical User Interface,图形用户界面)编程允许开发者创建直观且易于操作的桌面应用程序。Python作为一门高级编程语言,因其简洁的语法和强大的库支持,成为进行GUI开发的热门选择之一。本章我们将探索Python在GUI编程方面的基础,包括其编程范式、常用库及优势所在。随后,我们会介绍Python GUI编程的主流库,以及它们的特点和适用场景,为接下来章节中更深入的探讨做好铺垫。Python GUI编程不仅是开发者的一项必备技能,也是提升用户体验的关键。
QT通用配置文件库(QPreferences)
QPreferences项目是基于nlohmann/json的qt可视化配置文件库,将配置保存成json格式,并提供UI查看与修改,可通过cmake可快速添加进项目。默认支持基本类型、stl常用容器、基本类型与stl容器组成的结构体,若想添加不支持的类型,可参考nlohmann/json自行实现to_json和from_json函数。
HDMI设计2----EDID and E-EDID
1,EDID是什么?有什么用? 图1 应用场景 如图1所示的应用场景,PC将视频信号发送 到我们的设备上,经过一系列的传输和切换,设备将视频信号发送到显示器或者投影机上,也就是说,我们的设备位于PC和显示器之间。首先,在输入端,设备需要让PC知道自己是能够接受输入视频信号的,让PC认为自己是一台显示器。如果不这样做的话,PC可能会拒绝输出任何视频信号的(VGA接口不需要EDID也能输出)。除此之外,设备还要告诉PC自己支持的显示时序。而在输出端,当设备需要自建输出时序而不是简单的复制...
ESP32-C61 eFuse控制器深度解析:寄存器架构与安全烧写实践
eFuse(电子熔丝)是嵌入式芯片实现硬件级不可逆配置与信任根构建的核心物理机制,其本质是通过电学编程固化关键安全参数。原理上依赖熔丝单元的单向导通/断开特性,结合Reed-Solomon纠错、多级写保护和时序可控编程,保障数据在宽温域与工艺偏差下的高可靠性。技术价值在于为Secure Boot、Flash加密、密钥隔离等安全功能提供可信锚点,支撑从启动到运行的全链路防护。典型应用场景涵盖物联网设备量产烧录、安全启动使能、MAC地址固化及抗DPA密码运算配置。本文聚焦ESP32-C61平台,深入解析其eFu
在QT中配置snap7库
前面的博客中已经有PLC通过snap7的通讯文章,如有需请查看 snap7读写西门子plc1200步骤(python) - 工大机器人工作室 - CSDN博客 https://blog.csdn.net/qq_34935373/article/details/97374783 之前已经实现:通过手柄读,然后写文件,然后在通过python通过snap7写PLC。时间闲下来,琢磨怎么配置QT和S...
Windows 11 IoT企业版LTSC 24H2/25H2中文版安装指南(含OEM激活教程)
本文详细介绍了Windows 11 IoT企业版LTSC 24H2/25H2中文版的安装与OEM激活全流程。从系统镜像准备、硬件兼容性检查到自动化安装配置,再到OEM激活方案(包括SLIC注入和数字许可证激活),为工业自动化、数字标牌等物联网设备提供稳定可靠的系统部署指南。
QT调用Python脚本(无参,有参,返回值)和QT5.12安装详细讲解,避坑手册
QT调用Python脚本(无参,有参,返回值)详细讲解,避坑手册 因为工作需要,用QT调用Python脚本。网上查了一大堆,踩了无数的坑。终于算是可以了啊。 一个电脑小白的自我成长之路,总是那么漫长,充满疑惑苦恼,无奈,和成功之后的喜悦,开心,欣喜。 1.QT5.12安装 由于现在的Python版本基本都是3.7及其以上版本,基本都是64位。所以,先将QT版本也换一换,最少要换成64位的,我就在这踩的一个深深的坑。 QT5.12以及以上版本安装,直接截图啦。Qt5.12下载网址: http://downlo
4D毫米波雷达与激光雷达融合评测:3种主流融合框架在极端天气下的性能对比
本文深度评测了4D毫米波雷达与激光雷达在极端天气下的三大融合框架性能,包括前融合、特征级融合和后融合。通过实测数据对比,揭示了多传感器融合在暴雨、浓雾等恶劣环境中的显著优势,为自动驾驶感知系统提供了关键的技术参考和工程实践指南。
VBA一键汇总多个工作簿-名称相同的工作表-的指定区域数据
VBA一键汇总多个工作簿-名称相同的工作表-的指定区域数据 日常工作,我们经常需要汇总相同格式的工作簿的某个工作表的数据 如1月业绩、2月业绩。。。。12月业绩等 姓名 数量 数据22 22 数据23 23 数据24 24 数据25 25 数据26 26 数据27 27 数据28 28 数据29 29 数据30 30 数据31 31 数据32 32 数据33 33 数据34
【Linux中QT加载.so库与调用Python】
对于Jetson nano板子的QT调用Python函数的教程 QT如何导入库 QT引用Python库 QT/C++调用Python的函数
从零到一:移远EC200UCN_LA OpenCPU开发中的‘避坑’实战指南
本文详细介绍了移远EC200UCN_LA 4G通信模块的OpenCPU开发实战指南,涵盖开发环境搭建、项目构建、通信接口开发、调试技巧及固件升级等关键环节。通过避坑经验和实用技巧,帮助开发者高效完成二次开发,提升4G通信模块的应用开发效率。
QT调用python脚本时遇到的坑(十一大坑全有)
前言: 由于项目的需求需要在开发的上位机上调用python脚本 项目需求:QT需要调用python的脚本进行开发,但是开始入门的时候按照网上的教程进行一个简单的hello程序都会出错,下面来记录一下。 位数的坑: 首先因为做的项目要调用一个仪器的动态链接库,而那个动态链接库的位数是32位的,并且是VS编译生成的,所以我选的QT就是MSVC32位编译器,这就导致了后面的问题...
别再只调IoU了!给YOLOv8换上NWDLoss,实测小目标检测精度提升明显
本文深入探讨了YOLOv8在小目标检测中的优化策略,重点介绍了NWDLoss(Normalized Wasserstein Distance Loss)的应用优势。通过对比实验证明,NWDLoss能有效解决传统IoU损失函数的局限性,显著提升小目标检测精度,在遥感影像和交通监控等场景中表现尤为突出。文章提供了详细的代码实现和训练技巧,帮助开发者快速集成这一先进技术。
社会网络仿真软件:NetLogo_(14).社会网络数据导入与导出
在NetLogo中,社会网络的仿真不仅依赖于模型的内部逻辑,还需要能够灵活地导入和导出数据。这使得用户可以利用外部数据来初始化模型,或者将模型的运行结果导出以便进一步分析。本节将详细介绍如何在NetLogo中实现社会网络数据的导入和导出,包括常见的数据格式和具体的代码示例。
Qt中嵌入Python代码爬坑
Python官网的文件中有将Python嵌入的,这是python3.8的嵌入 #define PY_SSIZE_T_CLEAN #include <Python.h> int main(int argc, char *argv[]) { wchar_t *program = Py_DecodeLocale(argv[0], NULL); if (program == NULL) { fprintf(stderr, "Fatal error: cannot dec
LinePhone3.2.7(android端最新版本) sip客户端
SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/
【Qt+Python项目构建】- 01-首次配置 Qt Creator 14.01 for Python
如何用QT实现Python的配置的交互界面。本文从0开始,进行实践的介绍。这一节,我们再上一节基础上,配置一下 QT creator for python。
WINCC7.3破解文件
WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
Qt5的安装及Qt5使用C++调用pyton
因为python具有很多拓展模块,所以可以采用Qt去调用Python脚本进行项目开发。这里给出了具体用Qt调用python的步骤,并给出了常见的几个坑,供大家参考。
visio安装包
Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。
QT中OPENCV的配置(含扩展库)
QT里面添加OPENCV的库,和PYTHON里面会有点区别,这个是环境的配置
1010
4814
1261
8007

被折叠的 条评论
为什么被折叠?



