Qt Ubuntu install and configure a complete step (plus installation qtchart)

Qt is a cross-platform C ++ GUI library, Qt we usually use, accurate is it part of GUI programming. Qt provides functionality to application developers build graphical user interfaces need, and Qt can be easily extended. Basically, MFC on Qt and Motif on the X Window, Openwin, GTK graphical interface such as libraries and Windows platforms, OWL, VCl and ATl the same type of thing
Here Insert Picture Description
(1) install Qt: The first step: the official website http: / /download.qt.io/archive/qt/ Download Qt installation package, where I installed the qt-opensource-linux-x64-5.7.0.run; Step two: open a terminal, enter the command: "sudo chmod - R 777 qtopensource-linux-x64-5.7.0.run ", permission given to the installation package; step 3: start the installation Qt, enter the command" ./qt-opensource-linux-x64-5.7.0.run "or" sudo ./qt-opensource-linux-x64-5.7.0.run ", the difference between them is that a default Qt is installed in the home directory, which is installed in the root directory Qt / opt, of course, you You can set the graphical interface installation install their own path, but it would be best not; step four: according to the pop-up window, follow the prompts, has been click next, and then click skip, after been clicking next, until this point, attention, such as Figure, all options will be playing "√", click next, you can, and then wait for the installation;
Here Insert Picture Description
(2) Configuration Qt environment: Step 1: Qt installation is complete, first do not open, because the need to install additional tools and libraries. Step two: Open a terminal, type the command "sudo apt-get install gcc g ++", install linux compiler for programming; the third step: re-enter the command "sudo apt-get install libqt4- dev", otherwise there will be compile-time error "can not find -lgl"; step four: re-enter the command "sudo apt-get install build- essential", which is a compilation tool that allows us to know the program header files and libraries on which position; the first five steps: open Qt, namely in the terminal, enter the command "cd /home/.../Qt5.7.0/Tools/QtCreator/bin/", that is, using the cd command to enter your Qt installation directory (above command for Qt installed in home directory, if Qt installed in the root directory, use the command "cd /opt/Qt5.7.0/Tools/QtCreator/bin/"), then use the command "./qtcreator" open Qt; (. 3) to download the installation package Qt : Baidu cloud disk link: link: https://pan.baidu.com/s/1Ccqi0FpJMX_bU9VLMj4uOQ password: s07r

Transfer from above: https://www.jianshu.com/p/7dad1a4483bd

Qtcreator5.5 installation qchart, first download qtcharts, then enter this path, qmake it.

$git clone https://github.com/qtproject/qtcharts.git

$cd qtcharts

$qmake

Then there will be problems 'qtConfig' is nit a recongnized test function

Then enter:

$git checkout 5.7

出来:Brach 5.7 set up to track remote brach 5.7 from origin.

Switch to a new brach ‘5.7’

Then enter

$ qmake

There is no problem, then you can continue, you have to wait a while.

$make

$sudo make install

It should be noted that the installation qtcharts need qt 5.4 or later

Transfer from the original: https://blog.csdn.net/u012123768/article/details/77628567 Author: ChikelontonYoung

Guess you like

Origin blog.csdn.net/weixin_43935474/article/details/91413567