QWT is a plug-in for drawing, and here I add it to QT and then migrate to 2440.
First step: Install the QWT of the PC
ubuntu14.10 system comes with the installation of Qt-creator and Qt-designer, if you do not have these installed, can be installed in the Ubuntu Software Center, or use the command installation, as follows:
$ sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig Qt4-demos Qt4-designer
Note: Qt4-dev-tools includes tools such as QT Assistant and Qt linguist, so you do not need to install the two tools separately. Other, Qt4-doc is a help document that contains a detailed description of each class library in Qt and a rich example program that you can use to open reading with the QT Assistant tool. Qt4-qtconfig is a dialog box for configuring the QT environment, which is usually done by default, and it is seldom necessary to change it. Qt4-demos contains many executable files and source code that can be run. Qt4-designer is the designer used to design the GUI interface.
Install the driver that is connected to MySQL
$ sudo apt-get install Libqt4-sql-mysql
Install third-party QWT libraries
you can enter it at the command linesudo apt-get install libqt4-and then press the TAB key to complete automatically, listing alllibqt4- begins with a package (online says it can, but I don't work after tab, is a manual installation), as shown in:
For example $ sudo apt-get install libqwt5-qt4 Libqwt5-qt4-dev
Note: After installing these, open QT Designer, you will find the widget list on the left has more "QWT widget" this group;
Installing the integrated development environment Qdevelop
$ sudo apt-get install Qdevelop
Note: It is not necessary to install, but in my personal sense, using Qdevelop to write code and compile, debug, using QT Designer interface, development efficiency will be higher.
After the first step is complete, you can call QWT for UI design.
Above main reference http://blog.csdn.net/wodebudong/article/details/6456909
and Http://www.linuxidc.com/Linux/2010-08/27681.htm,
Step Two: Add the arm version of the QWT library
Download qwt-6.0.1 Compressed package (QWT official website can download), after decompression, the installation steps are as follows:
Compiling with the arm version of Qmake
Enter Qmake-v View version
Input commands Change Environment variables
Export path=/opt/embedsky/qt-4.5/__install/arm/bin/: $PATH
- Enter the source directory, edit Qwtconfig.pri file, locate the following statement and block it (add #): Qwt_config + = Qwtdesigner
- The following error occurred: qwt_symbol.cpp:20:26:fatal error:qsvgrenderer.h:no Such file or directory compilation terminated. It is arm-qt compile time without adding SVG support, then in the Qwtconfig.pri file to screen out the following two sentences: # Qwt_config + = Qwtsvg and the #QWT_CONFIG + = Qwtplayground
- The following error occurred: qwt_plot_glcanvas.h:15:17:fatal error:qgl.h:no Such file or directory compilation terminated. It is ARM-QT without OpenGL support, need to block the # in Qwtconfig.pri Qwt_config + = Qwtopengl this sentence.
- Make compile complete
- Make install note the path to install, which defaults to /USR/LOCAL/QWT-6.0.1/ , available in the Qwtconfig.pri qwt_install_prefix modified.
- Compile the test program, the compilation method is similar to the x86 compile method, the difference is the choice of Qmake, contains the header file path and the library path is different.
- compiling the QWT source code examples the routines in the folder (note that if you do not find the qgl.h error, ARM-QT does not compile OpenGL support, you need to remove the OpenGL section in the sample code).
- In addition, copy the library files under QWT generated/usr/local/qwt-6.0.1/lib/to the Lib directory in the Qt-arm installation directory.
Add QWT Library and header files to the. Pro file in QT Engineering
- Includepath + =/usr/local/qwt-6.0.1/include
- LIBS + =-L "/usr/local/qwt-6.0.1/lib"-lqwt
The following tutorial with the qwt-6.1.1 version of the, I compiled always do not pass, finally found the qwt-6.0.1 compiled by
The above compiled library files are copied to arm's file system directory in/usr/localqwt-6.0.1/lib or./qwt-6.0.1/lib./opt/qt-4.5/lib and then downloaded to the ARM Development Board
Above main reference HTTP://WWW.ARMBBS.NET/FORUM.PHP?MOD=VIEWTHREAD&TID=18949&HIGHLIGHT=QWT
After the installation is finished using Qt-designer design UI, using Qt-designer debugging, remember that you must not arbitrarily modify the/usr/localqwt-6.0.1/lib inside the library file.
Installation completion also has the following issues:
1.qt-designer designed QWT UI cannot be displayed on Qt-creator because Qt-creator does not add QWT plugins
2.qt-designer partial QWT controls are downloaded to arm, which causes arm to fail to boot to the UI interface, either missing the QWT library or qwt the library version is incorrect
3. Execute QT Project compiled executable file error is as follows
BASH:./hello_cn:cannot Execute binary file: Executable file format error
The reason is that the compiled arm version cannot run under x86, run X86_project before compiling, and not run Arm_project
4. May be because there is no embedded x86 QWT library, so the PC on the simulation will report QWT library does not exist errors, need to recompile QWT x86 library, and then added to the qt-x86 version of the library
Attached: (Other problems encountered during installation)
Before following the tutorial http://m.blog.csdn.net/blog/cupidove/43340961 start the installation, there is a problem qt-everywhere-opensource-src-4.6.2 Configured to x86 installation always error, change to qt-everywhere-opensource-src-4.5.3 and 4.5.0 is also the same, Compiled embedded version qt-embedded-linux-opensource-src-4.5.0 configuration into x86 also error, but configured to arm version can be compiled through, do not understand what is the reason
ubuntu14.10 installing ARM's QWT