m0_56453281 2022-10-11 11:15 采纳率: 85.7%
浏览 176
已结题

C++代码移植到QT中,并实现数据输入和曲线输出功能

C++代码移植到QT中,并实现数据输入和曲线输出功能
test.pro文件


QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    main.cpp \
    widget.cpp

HEADERS += \
    widget.h

INCLUDEPATH += \
    D:\QtFile\02\armadillo\include
    D:\QtFile\02\gsl\include

FORMS += \
    widget.ui

TRANSLATIONS += \
    test_zh_CN.ts

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

include($$PWD/gsl/gsl.pri)
# 宏定义项,指明采用GSL,不使用的话可能会遇到未知错误
DEFINES += GSL_DLL

# 指明GSL库所对应的头文件所在目录
INCLUDEPATH += $$PWD/gsl/include
# 指明依赖库关系,及所依赖的库所在位置
LIBS += -L$$PWD/gsl/lib/libgsl.a
LIBS += -L$$PWD/gsl/lib/libgslcblas.a



在ui上设置12个textedit,用来将数据输入至num_a、num_c、step_a、min_a、max_a、step_c 、min_c、max_c、Pay, Paz 、Pcx 、Pcy,

img

在ui上实现绘制图像,总计18个·

img


效果如下

img

报错:D:\qt\PROJECT\t\test\main.cpp:9: error: armadillo: No such file or directory

[](链接:https://pan.baidu.com/s/1o0KDVMUVrZTtqI8aSJ1MRA
提取码:og8i
--来自百度网盘超级会员V4的分享)

  • 写回答

2条回答 默认 最新

查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 10月19日
  • 已采纳回答 10月11日
  • 创建了问题 10月11日

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突