If you know C++ but have never touched Qt, or if you have already made some intermediate Qt applications, this chapter will ensure that your Qt foundations are solid before studying advanced concepts in the following chapters.
We will teach you how to create a simple todo application using Qt Creator. This application will display a list of tasks that you can create/update/delete. We will cover the Qt Creator and Qt Designer interfaces, an introduction to the signal/slot mechanism, the creation of a custom widget with custom signals/slots, and its integration into your application.
You will implement a todo app using new C++14 semantics: lambdas, auto variables, and for loops. Each of these concepts will be explained in depth and will be used throughout this book.
By the end of this chapter, you will be able to create a desktop application with a flexible UI using Qt widgets and new C++ semantics.
In this chapter, we will cover the following topics:
- Qt project basic structure
- MainWindow structure
- Qt Designer interface
- Signals and slots
- Custom QWidget
- C++14 lambda, auto, and for each