Qt Creator Quick Start Tutorial

A brief introduction to Qt

Qt is a cross-platform C++ application framework that supports Windows, Linux, Mac OS X, Android, iOS, Windows Phone, embedded systems, and more. In other words, Qt can support desktop application development, embedded development and mobile development at the same time, covering all existing mainstream platforms. You only need to write the code once and recompile it before publishing to different platforms. Qt is not just a GUI library, it can create a beautiful interface, there are many other components, for example, you no longer need to study STL, no longer need C++ <string> header files, no longer need to find XML, Various third-party libraries for connecting to databases and Sockets are already built into Qt. Qt is a one-stop solution for application development! Although Qt is huge and has a deep package, its speed is not slow. Although it is not as good as MFC, it is faster than Java and C#. Qt programs will eventually be compiled into native code instead of relying on a virtual machine.

2 Introduction to Qt Creator

Qt Creator is a cross-platform, complete Qt integrated development environment (IDE), which includes an advanced C++ code editor, project and build management tools, integrated context-sensitive help system, graphical debugger, code management and browsing tools etc.

Three Qt Creator download and installation

Address: http://download.qt.io/official_releases/qt/5.6/5.6.1-1/

 

After downloading, double-click qt-opensource-windows-x86-mingw494-5.6.1-1.exe. During the installation process, just click Next. It is recommended that beginners keep the default selection.

Tip: mingw492 in the download program indicates that this version of Qt uses MinGW as the compiler. MinGW, the Minimalist GUN For Windows, is the product of porting the GUN development tool to the win32 platform.

Four parts included after Qt download

The installed Qt mainly includes the following parts: 1) Qt Library: It is the Qt library, which is the core of Qt. 2) Qt Creator: A lightweight IDE developed based on Qt, launched after Qt was acquired by Nokia, the latest version is 3.5.1, very easy to use. Although other IDEs such as VS can also be used to develop Qt programs, we still recommend using Qt Creator, which is an official IDE specially created for Qt development. Qt Creator is a fast platform, and there is no need to re-learn the use of IDE after changing the platform. 3) Qt Designer: UI designer for Qt programs. With Qt Designer, you can develop simple GUI programs by dragging and dropping without writing code, and you can preview the program interface in time (no need to compile). 4) Qt Assistant: Qt help tool, including Qt tutorials, examples, class reference manuals, module introductions, etc., is the official information of Qt, similar to MSDN. To learn Qt, you must be able to use the Assistant to find information. 5) Qt Linguist: Qt Linguist is an internationalization tool of Qt. With it, the text on the interface can be easily translated into other languages, so that the program supports multiple languages ​​and is aimed at global users.

Five Qt uses

There are many programs developed using Qt. In 1997, Qt was used to develop the Linux desktop environment KDE, which was a great success, making Qt the de facto standard for developing C++ GUI programs in the Linux environment. Linux is also the main force of embedded, widely used in consumer electronics, industrial control, military electronics, telecommunications/network/communication, aerospace, automotive electronics, medical equipment, instrumentation and other related industries, where there is a shadow of Qt.

Tips: Under Windows, there are many GUI solutions, C++-based Qt, MFC, WTL, wxWidgets, DirectUI, Htmlayout, C#-based WinForm, WPF, Java-based AWT, Swing, Pascal-based Delphi, There is also aardio, which is emerging in China; if you have experience in web development, you can also convert web pages into desktop programs based on Webkit or Chromium.

Advantages of Six Qt

  • Easy to learn: Qt is well packaged, and a simple client can be developed with a few lines of code, while MFC is poorly packaged and needs to understand Windows API, which is generally reported as difficult to learn.
  • Rich information: Rich information can double the cost of learning, otherwise you can only look at the source code, and there is very little information about DirectUI, Htmlayout, and aardio.
  • Beautiful interface: Qt is easy to make beautiful interface and cool animation, but MFC, WTL, wxWidgets are more troublesome.
  • Independent installation: The Qt program will eventually be compiled into local code without the support of other libraries, while Java needs to install a virtual machine, and C# needs to install .NET Framework.
  • Cross-platform: If your program needs to run on multiple platforms and at the same time want to reduce development costs, Qt is almost a must.

Seven programs developed with Qt

The following programs are all developed using Qt (of course there are many more, here are just some):

WPS, YY Voice, Skype, Douban Radio, Xiami Music, Taobao Assistant, Qianniu, Blizzard’s Battle.net client, VirtualBox, Opera, Migu Music, Google Maps, Adobe Photoshop Album, etc.

Generally speaking, Qt is mainly used for desktop program development and embedded development.

The benefits of this article, free to receive Qt development learning materials package, technical video, including (C++ language foundation, C++ design pattern, introduction to Qt programming, QT signal and slot mechanism, QT interface development-image drawing, QT network, QT database programming, QT project actual combat, QSS, OpenCV, Quick module, interview questions, etc.) ↓↓↓↓↓↓See below↓↓Click on the bottom of the article to receive the fee↓↓

Guess you like

Origin blog.csdn.net/m0_73443478/article/details/131420087