QT4-->QT5的过渡

QT4 —->QT5之间发生的变化

fromAscii()
toAscii()

fromLatin1()
toLatin1()

一般情况下:
下载

QWT网址:http://qwt.sourceforge.net/qwtinstall.html

然后:
qmake
make
make install

下面是一种新的情况:

1.先装SVN(因为QWT是用SVN进行版本控制的,只能用SVN下载)
sudo apt-get install subversion
or
sudo apt-get install svn
2.下载QWT源代码
svn co https://qwt.svn.sourceforge.net/svnroot/qwt/trunk/qwt

  1. 打开qtcreator
    open projects->找到解压后的qwt-6.0.0中的qwt.pro文件–>open.
    4.build->clean all->run qmake
    clean all的作用是防止以前编译失败的文件运行,该步主要生成了makefile文件

5.rebuild qwt

  1. 进入到qwt-6.0.0目录,
    cd build-qwt-Desktop_Qt_5_6_0_GCC_64bit-Debug/
    执行命令:
    sudo make install
    7.在qwt的工程文件中加入

    INCLUDEPATH += /usr/local/qwt-6.0.0/include
    LIBS += -L”/usr/local/qwt-6.0.0/lib/” -lqwt

8.将编译好的qwt控件的库文件copy到qt creator的designer目录下就可以了
lib里面的文件也要拷到相应的文件夹下面

cp ~/qwt-6.0.0/designer/plugins/designer/* ~/qtsdk-2010.05/bin/designer/

9.重新打开qtcreator 就可以看见qdesigner里面就有了QWT的控件了。

原创文章 59 获赞 39 访问量 4万+

猜你喜欢

转载自blog.csdn.net/qq_28174951/article/details/78315185
Qt5