Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Application Development with Qt Creator - Second Edition
  • Toc
  • feedback
Application Development with Qt Creator - Second Edition

Application Development with Qt Creator - Second Edition

4 (25)
close
Application Development with Qt Creator - Second Edition

Application Development with Qt Creator - Second Edition

4 (25)

Overview of this book

This book is great for developers who are new to Qt and Qt Creator and who are interested in harnessing the power of Qt for cross-platform development. If you have basic experience programming in C++, you have what it takes to create engaging cross-platform applications using Qt and Qt Creator!
Table of Contents (15 chapters)
close
14
Index

Your main application and its menus

In order to use Qt Widgets, you need to do two things. First, you need to ensure that you include the widgets module in your project by adding the following line in your project's .pro file:

QT += widgets

Second, any file using the Qt Widgets should include the QWidgets header as one of the headers. You might also need to include the header files for individual widgets, such as QButton, QMenuBar, and so forth:

#include <QWidgets>

Qt provides the QGuiApplication class (a subclass of QCoreApplication) to manage your application's life cycle, including the event loop required by today's GUI platforms. You've already seen QCoreApplication, which we used for our console application in the first chapter.

You probably won't do much with QGuiApplication, but there are two signals it offers that are good for you to know about; these are as follows:

  • It emits the applicationStateChanged signal when the application state changes, notifying...
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete