This manual presents Qt Designer, a tool for designing and implementing user interfaces built with the Qt cross-platform application development framework. Qt Designer makes it easy to experiment with user interface design. At any time you can generate the code required to reproduce the user interface from the files Qt Designer produces, changing your design as often as you like. If you used the previous version you will find yourself immediately productive in the new version since the interface is fundamentally unchanged. But you will find new widgets and new and improved functionality which have been developed as a result of your feedback.
Qt Designer helps you build user interfaces with layout tools that move and scale your widgets (controls in Windows terminology) automatically at runtime. The resulting interfaces are both functional and attractive, comfortably suiting your users operating environments and preferences. Qt Designer supports Qt's signals and slots mechanism for type-safe communication between widgets. Qt Designer includes a code editor which you can use to embed your own custom slots inside the generated code. Those who prefer to separate generated code from hand crafted code can continue to use the subclassing approach pioneered in the first version of Qt Designer.
The tutorial introduces you to Qt Designer by leading you through the development of example applications. The tutorial chapters are written to be as self-contained as possible, but all of them assume that you are familiar with the material in chapter one which covers the basics of building a Qt application with Qt Designer. Here's a brief overview of the chapters:
Chapter one introduces Qt Designer and takes you step by step through the creation of a small but fully functional application. Along the way you will learn how to create a form and add widgets to it. In the course of this chapter you will use the form and property editors to customize the application, and learn how to lay out a form using the layout tools. You'll also learn how to use Qt's signals and slots mechanism and Qt Designer's built-in code editor to make the application functional. We will also explain how to use qmake to generate a Makefile so that you can compile and run the application.
In chapter two we will create a simple text editor. Through writing this application you will learn how to create a main window with menus and toolbars. We will see how to use Qt's built-in functionality to handle common tasks (e.g. copy and paste handling), and how to create our own functionality for our own menu items and toolbar buttons.
Chapter three introduces some of Qt's value editors.
Chapter four will show you how to subclass a form; this allows you to clearly separate the user interface from the underlying code that implements its functionality. Additional information on qmake and uic is included in this chapter. This chapter will also explain how you can dynamically load dialogs from .ui files into your application using QWidgetFactory and how to access the widgets and sub-widgets of these dialogs.
Chapter five explains how you can create your own custom widgets. Both the simple method, that was introduced with the first version of Qt Designer, and the new more powerful method using plugins, are explained.
Chapter six introduces Qt's SQL classes and takes you through an example that demonstrates how to execute SQL queries and how to set up master-detail relationships, perform drilldown and handle foreign keys.
Chapter seven focuses on Qt Designer itself, showing you how to customize Designer, how to integrate Designer with Visual Studio and how to create Makefiles.