aboutsummaryrefslogtreecommitdiffstats
path: root/doc/qtcreator/src/widgets/qtdesigner-overview.qdoc
blob: b0708db98dd1a33c8f56dba7f1de5d3ab1bc080d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
**
****************************************************************************/

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!
    \previouspage creator-qml-modules-with-plugins.html
    \page creator-using-qt-designer.html
    \nextpage adding-plugins.html

    \title Developing Widget Based Applications

    \QC automatically opens all .ui files in the integrated \QD, in \uicontrol Design
    mode.

    \image qtcreator-formedit.png

    For more information about \QD, see the \l{Qt Designer Manual}.

    Generally, the integrated \QD contains the same functions as the standalone
    \QD. The following sections describe the differences.

    \section1 Code Editor Integration

    To switch between forms (\uicontrol Design mode) and code (\uicontrol Edit mode),
    press \key Shift+F4.

    You can use \QC to create stub implementations of slot functions. In the
    \uicontrol Design mode, right-click a widget to open a context menu, and then
    select \uicontrol {Go to Slot}. Select a signal in the list to go to an existing
    slot function or to create a new slot function.

    \section1 Managing Image Resources

    In standalone \QD, image resources are created using the built-in
    \uicontrol {Resource Editor}. In \QC, .ui files are usually part of a project,
    which may contain several resource files (.qrc). They are created and
    maintained by using the \QC Resource Editor. The \QD \uicontrol {Resource Editor}
    is de-activated and the image resources are displayed in the \QD
    \uicontrol {Resource Browser}.

    \section1 Specifying Settings for Qt Designer

    You can drag and drop the views in \QD to new positions on the screen.

    To specify settings for \QD:

    \list

        \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Designer.

        \li Specify embedded device profiles, that determine style, font, and
            screen resolution, for example, in \uicontrol{Embedded Design}.

        \li Specify settings for the grid and previewing forms in \uicontrol Forms.

        \li Specify an additional folder for saving templates in \uicontrol{Template
            Paths}.

    \endlist

    To preview the settings, select \uicontrol Tools > \uicontrol{Form Editor} >
    \uicontrol Preview, or press \key Alt+Shift+R.

    \section1 Previewing Forms Using Device Profiles

    A \e {device profile} is a set of configuration files that describe a mobile
    device. It includes a border image that surrounds the form and depicts a
    mobile device with its buttons.

    To preview your form using device profiles, select \uicontrol Tools >
    \uicontrol {Form Editor} > \uicontrol {Preview In}, and then select a
    device profile.

    \section2 Adding Device Profiles

    To add device profiles:

    \list 1

        \li \uicontrol Edit > \uicontrol Preferences > \uicontrol Designer.
            \image qtdesigner-embedded-design.png "Qt Designer Embedded Design preferences"
        \li In \uicontrol {Embedded Design}, select \inlineimage icons/plus.png
            to open the \uicontrol {Add Profile} dialog.
            \image qtdesigner-add-profile.png "Add Profile dialog"
        \li In \uicontrol Name, enter a name for the device. The name is
            displayed as an option in \uicontrol {Preview In}.
        \li In \uicontrol Family, select the font to use.
        \li In \uicontrol {Point Size}, select the font size.
        \li In \uicontrol Style, select one of the predefined styles.
        \li In \uicontrol {Device DPI}, select one of the predefined DPI
            values or \uicontrol {User defined} to specify a custom value.
        \li Select \uicontrol OK to add the device profile to the list.
    \endlist

    To import device profiles from .qdp files, select \uicontrol Open. To save
    them as .qdp files, select \uicontrol Save.

    \section1 Adding Widgets

    You can use Qt APIs to create plugins that extend Qt applications. This
    enables you to add your own widgets to \QD. For more information, see
    \l{Adding Qt Designer Plugins}.
*/