m0_56453281 2022-10-11 14:26 采纳率: 85.7%
浏览 36
已结题

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上实现绘制图像,总计16个

img


图像效果图

img


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

  • 写回答

2条回答 默认 最新

  • 加油吧,小杜 2022-10-12 17:11
    关注

    绘图的话推荐你使用qcustomplot进行二次开发,实现你上面的效果非常简易

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

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

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改