Linux QT Configuration

Source: Internet
Author: User
Tags qt designer

Does want to does programming in Linux? Probably you need C + + programming environment in Linux. Then you need a GUI programming toolkit for C + +. You can choose C + + with the Qt Framework programming environment in Ubuntu. I'll show you what to get them all (complete with C + + library and an IDE) Ubuntu 15.04. Magically, you get them all just by installing Qt Creator.

650) this.width=650; "src=" Http://www.th7.cn/d/file/p/2015/05/26/75017e5c1afc0be80961398555092e8d.png "style=" border:0px;margin:0px;padding:10px 0px; "alt=" 75017e5c1afc0be80961398555092e8d.png "/>
Qt Creator, C + +, and Qt Framework
About Build-essential

the  build-essential  is a metapackage (package, pull another packages) to install all C + + Programmi NG tools in Ubuntu. If you install it, you'll get  GNU g++   (a most used C + + compiler),   GNU Gcc  (A most used C compiler),   make   (a build utility),   Libc-dev   (a collection of the GNU C Library), and  Dpkg-dev   (a collection of dpkg tool for developing D Ebian package). In Ubuntu 15.04, you already got them all pre-installed. Need to install it again.

In Ubuntu 12.04, the still need to the install Build-essential by command

sudo apt-get install build-essential
Install Qt Creator

By the GUI, you can use the Ubuntu software Center to search qt creator and install it.

650) this.width=650; "src=" Http://www.th7.cn/d/file/p/2015/05/26/2b1bce51effb9cf8ee3de7f11649e4b0.png "style=" border:0px;margin:0px;padding:10px 0px; "alt=" 2b1bce51effb9cf8ee3de7f11649e4b0.png "/>
Installing Qt Creator by GUI

By Terminal, you can use the This command:

sudo apt-get install Qtcreator
650) this.width=650; "src=" Http://www.th7.cn/d/file/p/2015/05/26/35df4309e27fa1aa4fb8f04212329c9b.png "style=" border:0px;margin:0px;padding:10px 0px; "alt=" 35df4309e27fa1aa4fb8f04212329c9b.png "/>
Installing Qt Creator by Terminal

It'll download approximately to packages. It needs approximately 144 MB disk space when finished.

Install Qt Framework Complete Documentation

By default, you get the no documentation by just installing qtcreator package. If you need QT examples, demos, complete documentation, so can read it inside QT Creator offline, install them by this Command.

sudo apt-get install Qt5-doc qtbase5-examples qtbase5-doc-html
    • Qt5-doc : This package contains Qt 5 API documentation.

    • qtbase5-examples : This package contains Qt base 5 examples.

    • qtbase5-doc-html : The contains the HTML documentation for the QT 5 base libraries

650) this.width=650; "src=" Http://www.th7.cn/d/file/p/2015/05/26/d9bc2f755b425cc67793bf790a6874c1.png "style=" border:0px;margin:0px;padding:10px 0px; "alt=" D9bc2f755b425cc67793bf790a6874c1.png "/>
Qt C + + program Examples
Using Qt Creator

for first usage, you can create a C + + GUI program by using the QT Widget Project option in Qt Creator. Actually. Many other project templates, and for the first time you should a try this first. Create it by menu New File or Project (CTRL + N) > select Project > select Qt Widget application > Press Choose but ton > Type your project name > Next, Next, and finish. To compile your C++/QT project, press Run button (green triangle icon in the left panel) or just ctrl+r. See picture below.

650) this.width=650; "src=" Http://www.th7.cn/d/file/p/2015/05/26/019d0c81413edaf00511932e6d30cda9.png "style=" border:0px;margin:0px;padding:10px 0px; "alt=" 019d0c81413edaf00511932e6d30cda9.png "/>

Selecting Project

650) this.width=650; "src=" Http://www.th7.cn/d/file/p/2015/05/26/530e4634899d2c5870330f4b96430f20.png "style=" border:0px;margin:0px;padding:10px 0px; "alt=" 530e4634899d2c5870330f4b96430f20.png "/>
Running Program
Using Qt Documentation

1. C++/QT Examples -After installing those three packages, open Examples sections in Qt Creator. You'll see the many C++/QT program examples. Click One and you have it. Just Run (ctrl+r) you build and execute it. See picture below.

650) this.width=650; "src=" Http://www.th7.cn/d/file/p/2015/05/26/966613e0afbaf6d48452e69793ba36be.png "style=" border:0px;margin:0px;padding:10px 0px; "alt=" 966613e0afbaf6d48452e69793ba36be.png "/>
Running C++/QT Example

2. QT API Reference  -you get also Qt API documentation completely. Need Internet to read it. For examples, if-use-a Qt Class in your source code, say it Qpushbutton, just put your cursor on the that text, and press F1. Qt Creator would show you the Qpushbutton Class API Reference in Right panel. See picture below. See the right panel.

650) this.width=650, "src=" http://www.th7.cn/d/file/p/2015/05/26/42d60991786e30cf51643c61b339467f.png "style=" border : 0px;margin:0px;padding:10px 0px; "alt=" 42d60991786e30cf51643c61b339467f.png "/>
left Panel Qt API Reference documentation

you get also complete QT API References for whole QT Framework. To see them, open Qt Creator > Click help icon on the left panel > select Qt 5.x.x Reference from left entry > SE E documentation on the right panel. You also has all the rest of another QT related documentation (such as Qt Dbus, Qt Designer, Qt Quick, and many more Manu ALS) on the same left panel. See picture below.

650) this.width=650, "src=" http://www.th7.cn/d/file/p/2015/05/26/fbc1e4bfd0e3bd7ab141b7eb271393ba.png "style=" border : 0px;margin:0px;padding:10px 0px; "alt=" Fbc1e4bfd0e3bd7ab141b7eb271393ba.png "/>
complete Qt Framework Documentation

3. QT Creator IDE Documentation  -you get also Qt Creator IDE documentation. It is a comprehensive help in Qt Creator usage as an advanced editor. Get all your need here. To see it, just open Qt Creator and click Help icon on the left panel and click Home icon on top panel. Should configure it first to show the Main Page by menu Tools > Options > Help > Tab documentation > A DD > the file path is  /usr/share/qtcreator/doc/qtcreator.qch  . See picture below.

650) this.width=650; "src=" Http://www.th7.cn/d/file/p/2015/05/26/6659760d885efe45b7c32d2dbb2e7b7b.png "style=" border:0px;margin:0px;padding:10px 0px; "alt=" 6659760d885efe45b7c32d2dbb2e7b7b.png "/>
Qt Creator IDE Documentation
Reference


Linux QT Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.