Doc: Further replace 'Qt Designer' with 'Qt Widgets Designer'
Use \QD macro wherever possible. Amends 8aceccc7eb075 Task-number: QTBUG-122253 Change-Id: I276dabd40fb81486f6380fd90cf9968990932a24 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
d5deca54cb
commit
b74f814ae2
@ -143,25 +143,25 @@
|
|||||||
|
|
||||||
The wizard generates a user interface definition in XML format: notepad.ui.
|
The wizard generates a user interface definition in XML format: notepad.ui.
|
||||||
When you open the notepad.ui file in Qt Creator, it automatically
|
When you open the notepad.ui file in Qt Creator, it automatically
|
||||||
opens in the integrated Qt Designer.
|
opens in the integrated \QD.
|
||||||
|
|
||||||
When you build the application, Qt Creator launches the Qt
|
When you build the application, Qt Creator launches the Qt
|
||||||
\l{User Interface Compiler (uic)} that reads the .ui file and creates
|
\l{User Interface Compiler (uic)} that reads the .ui file and creates
|
||||||
a corresponding C++ header file, ui_notepad.h.
|
a corresponding C++ header file, ui_notepad.h.
|
||||||
|
|
||||||
\section2 Using Qt Designer
|
\section2 Using \QD
|
||||||
|
|
||||||
The wizard creates an application that uses a QMainWindow. It has
|
The wizard creates an application that uses a QMainWindow. It has
|
||||||
its own layout to which you can add a menu bar, dock widgets, toolbars,
|
its own layout to which you can add a menu bar, dock widgets, toolbars,
|
||||||
and a status bar. The center area can be occupied by any kind of widget.
|
and a status bar. The center area can be occupied by any kind of widget.
|
||||||
The wizard places the Notepad widget there.
|
The wizard places the Notepad widget there.
|
||||||
|
|
||||||
To add widgets in Qt Designer:
|
To add widgets in \QD:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li In the Qt Creator \uicontrol Edit mode, double-click the notepad.ui
|
\li In the Qt Creator \uicontrol Edit mode, double-click the notepad.ui
|
||||||
file in the \uicontrol Projects view to launch the file in the integrated
|
file in the \uicontrol Projects view to launch the file in the integrated
|
||||||
Qt Designer.
|
\QD.
|
||||||
\li Drag and drop widgets Text Edit (QTextEdit) to the form.
|
\li Drag and drop widgets Text Edit (QTextEdit) to the form.
|
||||||
\li Press \key {Ctrl+A} (or \key {Cmd+A}) to select the widgets and click
|
\li Press \key {Ctrl+A} (or \key {Cmd+A}) to select the widgets and click
|
||||||
\uicontrol {Lay out Vertically} (or press \key {Ctrl+L}) to apply a vertical
|
\uicontrol {Lay out Vertically} (or press \key {Ctrl+L}) to apply a vertical
|
||||||
@ -169,7 +169,7 @@
|
|||||||
\li Press \key {Ctrl+S} (or \key {Cmd+S}) to save your changes.
|
\li Press \key {Ctrl+S} (or \key {Cmd+S}) to save your changes.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
The UI now looks as follows in Qt Designer:
|
The UI now looks as follows in \QD:
|
||||||
|
|
||||||
\image notepad4.png
|
\image notepad4.png
|
||||||
|
|
||||||
|
@ -5465,7 +5465,7 @@
|
|||||||
\li \l{HEADERS} - A list of header files for the application.
|
\li \l{HEADERS} - A list of header files for the application.
|
||||||
\li \l{SOURCES} - A list of C++ source files for the application.
|
\li \l{SOURCES} - A list of C++ source files for the application.
|
||||||
\li \l{FORMS} - A list of UI files for the application (created using
|
\li \l{FORMS} - A list of UI files for the application (created using
|
||||||
Qt Designer).
|
\QD).
|
||||||
\li \l{LEXSOURCES} - A list of Lex source files for the application.
|
\li \l{LEXSOURCES} - A list of Lex source files for the application.
|
||||||
\li \l{YACCSOURCES} - A list of Yacc source files for the
|
\li \l{YACCSOURCES} - A list of Yacc source files for the
|
||||||
application.
|
application.
|
||||||
@ -5600,7 +5600,7 @@
|
|||||||
\li VERSION - The version number of the target library. For example, 2.3.1.
|
\li VERSION - The version number of the target library. For example, 2.3.1.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section2 Building a Qt Designer Plugin
|
\section2 Building a Qt Widgets Designer Plugin
|
||||||
|
|
||||||
\QD plugins are built using a specific set of configuration settings that
|
\QD plugins are built using a specific set of configuration settings that
|
||||||
depend on the way Qt was configured for your system. For convenience, these
|
depend on the way Qt was configured for your system. For convenience, these
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
\section1 Flags and the Meta-Object System
|
\section1 Flags and the Meta-Object System
|
||||||
|
|
||||||
The Q_DECLARE_FLAGS() macro does not expose the flags to the meta-object
|
The Q_DECLARE_FLAGS() macro does not expose the flags to the meta-object
|
||||||
system, so they cannot be used by Qt Script or edited in Qt Designer.
|
system, so they cannot be used by Qt Script or edited in \QD.
|
||||||
To make the flags available for these purposes, the Q_FLAG() macro must
|
To make the flags available for these purposes, the Q_FLAG() macro must
|
||||||
be used:
|
be used:
|
||||||
|
|
||||||
|
@ -2202,7 +2202,7 @@ void QCoreApplicationPrivate::quit()
|
|||||||
to all toplevel widgets, where a reimplementation of changeEvent can
|
to all toplevel widgets, where a reimplementation of changeEvent can
|
||||||
re-translate the user interface by passing user-visible strings via the
|
re-translate the user interface by passing user-visible strings via the
|
||||||
tr() function to the respective property setters. User-interface classes
|
tr() function to the respective property setters. User-interface classes
|
||||||
generated by Qt Designer provide a \c retranslateUi() function that can be
|
generated by \QD provide a \c retranslateUi() function that can be
|
||||||
called.
|
called.
|
||||||
|
|
||||||
The function returns \c true on success and false on failure.
|
The function returns \c true on success and false on failure.
|
||||||
|
@ -893,9 +893,9 @@ QMetaCallEvent* QMetaCallEvent::create_impl(QtPrivate::SlotObjUniquePtr slotObj,
|
|||||||
|
|
||||||
\l uic generates code that invokes this function to enable
|
\l uic generates code that invokes this function to enable
|
||||||
auto-connection to be performed between widgets on forms created
|
auto-connection to be performed between widgets on forms created
|
||||||
with \e{Qt Designer}. More information about using auto-connection with \e{Qt Designer} is
|
with \e{\QD}. More information about using auto-connection with \e{\QD} is
|
||||||
given in the \l{Using a Designer UI File in Your Application} section of
|
given in the \l{Using a Designer UI File in Your Application} section of
|
||||||
the \e{Qt Designer} manual.
|
the \l{Qt Widgets Designer Manual}{\QD} manual.
|
||||||
|
|
||||||
\section1 Dynamic Properties
|
\section1 Dynamic Properties
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
You can customize the tab order using QWidget::setTabOrder(). (If
|
You can customize the tab order using QWidget::setTabOrder(). (If
|
||||||
you don't, \uicontrol Tab generally moves focus in the order of widget
|
you don't, \uicontrol Tab generally moves focus in the order of widget
|
||||||
construction.) Qt Designer provides a means of visually
|
construction.) \QD provides a means of visually
|
||||||
changing the tab order.
|
changing the tab order.
|
||||||
|
|
||||||
Since pressing \uicontrol Tab is so common, most widgets that can have focus
|
Since pressing \uicontrol Tab is so common, most widgets that can have focus
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
Qt's layout classes were designed for hand-written C++ code, allowing
|
Qt's layout classes were designed for hand-written C++ code, allowing
|
||||||
measurements to be specified in pixels for simplicity, so they are easy to
|
measurements to be specified in pixels for simplicity, so they are easy to
|
||||||
understand and use. The code generated for forms created using Qt Designer also
|
understand and use. The code generated for forms created using \QD also
|
||||||
uses the layout classes. Qt Designer is useful to use when experimenting with the
|
uses the layout classes. \QD is useful to use when experimenting with the
|
||||||
design of a form since it avoids the compile, link and run cycle usually
|
design of a form since it avoids the compile, link and run cycle usually
|
||||||
involved in user interface development.
|
involved in user interface development.
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
\list
|
\list
|
||||||
\li \l{Overview}
|
\li \l{Overview}
|
||||||
\li \l{The Style Sheet Syntax}
|
\li \l{The Style Sheet Syntax}
|
||||||
\li \l{Qt Designer Integration}
|
\li \l{Qt Widgets Designer Integration}
|
||||||
\li \l{Customizing Qt Widgets Using Style Sheets}
|
\li \l{Customizing Qt Widgets Using Style Sheets}
|
||||||
\li \l{Qt Style Sheets Reference}
|
\li \l{Qt Style Sheets Reference}
|
||||||
\li \l{Qt Style Sheets Examples}
|
\li \l{Qt Style Sheets Examples}
|
||||||
@ -75,7 +75,7 @@
|
|||||||
consideration. Unlike palette fiddling, style sheets offer
|
consideration. Unlike palette fiddling, style sheets offer
|
||||||
guarantees: If you set the background color of a QPushButton to be
|
guarantees: If you set the background color of a QPushButton to be
|
||||||
red, you can be assured that the button will have a red background
|
red, you can be assured that the button will have a red background
|
||||||
in all styles, on all platforms. In addition, Qt Designer
|
in all styles, on all platforms. In addition, \QD
|
||||||
provides style sheet integration, making it easy to view the effects
|
provides style sheet integration, making it easy to view the effects
|
||||||
of a style sheet in different \l{QStyle}{widget styles}.
|
of a style sheet in different \l{QStyle}{widget styles}.
|
||||||
|
|
||||||
@ -100,7 +100,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\page stylesheet-syntax.html
|
\page stylesheet-syntax.html
|
||||||
\previouspage Qt Style Sheets
|
\previouspage Qt Style Sheets
|
||||||
\nextpage Qt Designer Integration
|
\nextpage Qt Widgets Designer Integration
|
||||||
\title The Style Sheet Syntax
|
\title The Style Sheet Syntax
|
||||||
|
|
||||||
Qt Style Sheet terminology and syntactic rules are almost
|
Qt Style Sheet terminology and syntactic rules are almost
|
||||||
@ -523,22 +523,22 @@
|
|||||||
\page stylesheet-designer.html
|
\page stylesheet-designer.html
|
||||||
\previouspage The Style Sheet Syntax
|
\previouspage The Style Sheet Syntax
|
||||||
\nextpage Customizing Qt Widgets Using Style Sheets
|
\nextpage Customizing Qt Widgets Using Style Sheets
|
||||||
\title Qt Designer Integration
|
\title Qt Widgets Designer Integration
|
||||||
|
|
||||||
Qt Designer{Qt Designer} is an excellent tool
|
\l{Qt Widgets Designer Manual}{\QD} is an excellent tool
|
||||||
to preview style sheets. You can right-click on any widget in Designer
|
to preview style sheets. You can right-click on any widget in Designer
|
||||||
and select \uicontrol{Change styleSheet...} to set the style sheet.
|
and select \uicontrol{Change styleSheet...} to set the style sheet.
|
||||||
|
|
||||||
\image designer-stylesheet-options.png
|
\image designer-stylesheet-options.png
|
||||||
|
|
||||||
In Qt 4.2 and later, Qt Designer also includes a
|
In Qt 4.2 and later, \QD also includes a
|
||||||
style sheet syntax highlighter and validator. The validator indicates
|
style sheet syntax highlighter and validator. The validator indicates
|
||||||
if the syntax is valid or invalid, at the bottom left of the \uicontrol{Edit
|
if the syntax is valid or invalid, at the bottom left of the \uicontrol{Edit
|
||||||
Style Sheet} dialog.
|
Style Sheet} dialog.
|
||||||
|
|
||||||
\image designer-validator-highlighter.png
|
\image designer-validator-highlighter.png
|
||||||
|
|
||||||
When you click \uicontrol{OK} or \uicontrol{Apply}, Qt Designer will automatically display
|
When you click \uicontrol{OK} or \uicontrol{Apply}, \QD will automatically display
|
||||||
the widget with its new stylesheet.
|
the widget with its new stylesheet.
|
||||||
|
|
||||||
\image designer-stylesheet-usage.png
|
\image designer-stylesheet-usage.png
|
||||||
@ -546,7 +546,7 @@
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\page stylesheet-customizing.html
|
\page stylesheet-customizing.html
|
||||||
\previouspage Qt Designer Integration
|
\previouspage Qt Widgets Designer Integration
|
||||||
\nextpage Qt Style Sheets Reference
|
\nextpage Qt Style Sheets Reference
|
||||||
\title Customizing Qt Widgets Using Style Sheets
|
\title Customizing Qt Widgets Using Style Sheets
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@
|
|||||||
|
|
||||||
As well as QHBoxLayout and QVBoxLayout, Qt also provides QGridLayout
|
As well as QHBoxLayout and QVBoxLayout, Qt also provides QGridLayout
|
||||||
and QFormLayout classes to help with more complex user interfaces.
|
and QFormLayout classes to help with more complex user interfaces.
|
||||||
These can be seen if you run Qt Designer.
|
These can be seen if you run \QD.
|
||||||
|
|
||||||
\section1 Setting up the Model
|
\section1 Setting up the Model
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@
|
|||||||
In addition, Qt provides a number of ready-made standard dialogs that can be
|
In addition, Qt provides a number of ready-made standard dialogs that can be
|
||||||
used for standard tasks like file or font selection.
|
used for standard tasks like file or font selection.
|
||||||
|
|
||||||
Both main windows and dialogs can be created with Qt Designer, Qt's visual design tool.
|
Both main windows and dialogs can be created with \QD, Qt's visual design tool.
|
||||||
Using Qt Designer is a lot faster than hand-coding, and makes it easy to test different
|
Using \QD is a lot faster than hand-coding, and makes it easy to test different
|
||||||
design ideas. Creating designs visually and reading the code generated by
|
design ideas. Creating designs visually and reading the code generated by
|
||||||
\l{uic} is a great way to learn Qt!
|
\l{uic} is a great way to learn Qt!
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
\brief This example displays a text editor with the user interface written
|
\brief This example displays a text editor with the user interface written
|
||||||
in pure C++.
|
in pure C++.
|
||||||
|
|
||||||
A similar example which uses Qt Designer to produce the user
|
A similar example which uses \QD to produce the user
|
||||||
interface is in the \l {Qt Designer Manual}.
|
interface is in the \l {Qt Widgets Designer Manual}.
|
||||||
|
|
||||||
|
|
||||||
See \c{$QTDIR/examples/textedit} for the source code.
|
See \c{$QTDIR/examples/textedit} for the source code.
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
and a stretchable space in a separate \l QHBoxLayout first, to make the
|
and a stretchable space in a separate \l QHBoxLayout first, to make the
|
||||||
buttons appear in the \c Window widget's bottom right corner.
|
buttons appear in the \c Window widget's bottom right corner.
|
||||||
|
|
||||||
Alternatively, we could have used Qt Designer to construct a UI file,
|
Alternatively, we could have used \QD to construct a UI file,
|
||||||
and \l {uic} to generate this code.
|
and \l {uic} to generate this code.
|
||||||
|
|
||||||
\snippet dialogs/findfiles/window.cpp 1
|
\snippet dialogs/findfiles/window.cpp 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user