Qt5学习:Qwt的安装与使用

2017-09-10  本文已影响403人  虞锦雯

一、环境

二、配置

改前:

win32 {
    # On Windows you can't mix release and debug libraries.
    # The designer is built in release mode. If you like to use it
    # you need a release version. For your own application development you
    # might need a debug version. 
    # Enable debug_and_release + build_all if you want to build both.

    CONFIG           += debug_and_release
    CONFIG           += build_all
}

改后:

win32 {
    # On Windows you can't mix release and debug libraries.
    # The designer is built in release mode. If you like to use it
    # you need a release version. For your own application development you
    # might need a debug version. 
    # Enable debug_and_release + build_all if you want to build both.

    #CONFIG           += debug_and_release
    CONFIG           += build_all
}

注意:qwt 控件需要右击 ui 文件,选择“用...打开”中的 Qt Designer 才能看到,直接双击 ui 文件打开看不到。
完成以上操作,qwt已经差不多配置好了,但还不能直接运用。

三、运用

新建一个项目,在项目文件(.pro)中添加一下代码:

LIBS += -LD:\Qt\Qt5.8.0\5.8\msvc2013_64\lib -lqwtd
INCLUDEPATH += D:\Qt\Qt5.8.0\5.8\msvc2013_64\include\qwt

到这里 qwt 控件就可以运行了。

qwt运行例图.PNG
上一篇下一篇

猜你喜欢

热点阅读