linux qt 声音配置,linux QT 配置

Do you want to do 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 Qt Framework programming environment in Ubuntu. I will show you how to get them all (complete with C++ library and an IDE) Ubuntu 15.04. Magically, you get them all just by installing Qt Creator.

0818b9ca8b590ca3270a3433284dd417.png

Qt Creator, C++, and Qt Framework

About build-essential

The build-essential is a metapackage (package that pull another packages) to install all C++ programming tools in Ubuntu. If you install it, you will get GNU g++ (a most used C++ compiler), GNU gcc (a most used C compiler), make (a build utility), libc-dev (a collection of GNU C Library), and dpkg-dev (a collection of dpkg tool for developing Debian package). In Ubuntu 15.04, you already got them all pre-installed. You do not need to install it again.

In Ubuntu 12.04, you still need to install build-essential by command

sudo apt-get install build-essential

Install Qt Creator

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

0818b9ca8b590ca3270a3433284dd417.png

Installing Qt Creator by GUI

By Terminal, you can use this command:

sudo apt-get install qtcreator

0818b9ca8b590ca3270a3433284dd417.png

Installing Qt Creator by Terminal

It will download approximately 38 MB packages. It needs approximately 144 MB disk space when finished.

Install Qt Framework Complete Documentation

By default, you get no documentation by just installing qtcreator package. If you need Qt examples, demos, complete documentation, so you 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 : this package contains the HTML documentation for the Qt 5 base libraries

0818b9ca8b590ca3270a3433284dd417.png

Qt C++ Program Examples

Using Qt Creator

For first usage, you can create a C++ GUI program by using Qt Widget Project option in Qt Creator. Actually, you have so many other project templates, but for the first time you should try this first. Create it by menu New File or Project (Ctrl+N) > select Project > select Qt Widget Application > press Choose button > type your project name > next, next, and finish. To compile your C++/Qt project, press Run button (green triangle icon on the left panel) or just Ctrl+R. See picture below.

0818b9ca8b590ca3270a3433284dd417.png

Selecting Project

0818b9ca8b590ca3270a3433284dd417.png

Running Program

Using Qt Documentation

1. C++/Qt Examples - After installing those three packages, open Examples section in Qt Creator. You will see many C++/Qt program examples. Click one and you have it. Just run (Ctrl+R) you build and execute it. See picture below.

0818b9ca8b590ca3270a3433284dd417.png

Running C++/Qt Example

2. Qt API Reference - You get also Qt API Documentation completely. And you do not need internet to read it. For examples, if you use a Qt Class in your source code, say it QPushButton, just put your cursor on that text, and press F1. Qt Creator will show you the QPushButton Class API Reference in right panel. See picture below. See the right panel.

0818b9ca8b590ca3270a3433284dd417.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 > see documentation on the right panel. You also have all the rest of another Qt related documentation (such as Qt Dbus, Qt Designer, Qt Quick, and many more manuals) on the same left panel. See picture below.

0818b9ca8b590ca3270a3433284dd417.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. You get all you need here. To see it, just open Qt Creator and click Help icon on the left panel and click Home icon on top panel. But you should configure it first to show the Main Page by menu Tools > Options > Help > tab Documentation > Add > the file path is /usr/share/qtcreator/doc/qtcreator.qch . See picture below.

0818b9ca8b590ca3270a3433284dd417.png

Qt Creator IDE Documentation

Reference

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值