Home > Articles > Programming > C/C++

C++ GUI Programming with Qt4: Building Qt Applications

  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss

This chapter is from the book

This appendix covers the three options for building Qt applications with a build tool: qmake, a third-party build tool, or an integrated development environment (IDE).

B. Building Qt Applications

  • Using qmake
  • Using Third-Party Build Tools

Building Qt applications is greatly simplified by the use of a build tool. Three options are open to us: We can use the qmake tool supplied with Qt, we can use a third-party build tool, or we can use an integrated development environment (IDE).

The qmake tool generates a platform-specific makefile from a platform-neutral .pro file. The tool has the necessary logic to invoke Qt's code-generating tools (moc, uic, and rcc) built-in. We have used qmake for all the examples in the book, in most cases using relatively simple .pro files. In fact, qmake provides a rich range of features including the ability to create makefiles that recursively invoke other makefiles and to switch certain features on or off depending on the target platform. In the first section of this appendix, we will review qmake and introduce some of its more advanced features.

In theory, any third-party build tool can be used for Qt development, but it is much easier to use one that is already Qt-aware. We will look at some of the Qt-aware build tools in the second section.

Some developers would rather use an IDE to build their applications. Trolltech provides software to integrate with Visual Studio and Eclipse (shown in Figure B.1), and the open source IDEs KDevelop and QDevelop—both written using Qt—provide excellent support for Qt development.

vsintegration.jpg

Figure B.1 The Qt Visual Studio and Eclipse integrations in action

  • Share ThisShare This
  • Save To Your Account
C++ GUI Programming with Qt4, 2nd Edition

This chapter is from the book

C++ GUI Programming with Qt4, 2nd Edition

Learn MoreAdd To Cart

Discussions

comments powered by Disqus

Related Resources

#TuesdayTrivia: Spotlight on WP7 (Win a copy of Sams Teach Yourself Windows Phone 7 Application Development)
By on May 2, 2012Comments
These days, what CAN'T a smartphone do? Microsoft is putting their own spin on things to help you experience "life in motion" when using your device. Instead of containing static application icons, the re-imagined Start screen features live Tiles showing real-time content updates.

March Trivia #1: Let there be light! (Win Microsoft Visual Studio LightSwitch Unleashed)
By on March 13, 2012Comments
Want a simplified self-service tool to help you build business applications for the desktop and beyond? Microsoft programmers… meet Visual Studio LightSwitch.

February Trivia #2: There's an App for That (Win Sams Teach Yourself iOS 5 Application Development in 24 Hours)
By on February 28, 2012Comments
In less than a decade, the iOS platform has changed the way we think about mobile communication.

See All Related Blogs