Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
assistant-quick-guide.qdoc
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \if !defined(ASSISTANT_INTERNAL)
6 \previouspage Qt Assistant Manual
7 \endif
8 \page assistant-quick-guide.html
9 \nextpage Using Qt Assistant
10
11 \title Qt Assistant Quick Guide
12
13 Once you have installed Qt, you can start Qt Assistant in the same way as
14 any other application on the development host.
15
16 The \QA main window contains a sidebar (1) with navigation windows for:
17
18 \list
19 \li Viewing a list of documents in Qt help format that are installed on
20 the development host.
21 \li Managing bookmarks.
22 \li Searching for keywords in the index.
23 \li Searching for information using a free text search function.
24 \li Switching between open topics.
25 \endlist
26
27 The selected topic in the selected document is displayed in the
28 \b Documentation window (2).
29
30 \image assistant-assistant.png {Screenshot of the \QA window with
31 options to choose documentation of every category}
32
33 Click the \gui Previous and \gui Next toolbar buttons (3) to navigate within
34 the topics you have visited.
35
36 \section1 Managing Bookmarks
37
38 \image assistant-bookmarks.png {Screenshot showing the bookmark menu of the
39 \QA to save documentation}
40
41 To bookmark topics of particular interest, select \gui Bookmarks >
42 \gui {Add Bookmark} (or press \key{Ctrl+B}). A bookmark for the
43 page that is currently showing in the \gui Documentation window is added.
44
45 You can view and manage bookmarks in the \gui Bookmarks window.
46 Double-click a bookmark to open the topic in the \gui Documentation window.
47 You can also right-click the bookmark and select \gui{Show Bookmark} in the
48 context menu.
49
50 To rename or delete the highlighted bookmark, select \gui {Rename Bookmark}
51 or \gui {Delete Bookmark} in the context menu.
52
53 \section1 Searching for Keywords
54
55 \image assistant-index.png {Screenshot of the \QA index menu to search
56 for keywords}
57
58 To perform an index search, click the \gui{Index} tab on the sidebar
59 (or press \key{Alt+I}). In the \gui{Look For} field, enter the search term.
60 As you type, words are found and highlighted in a list beneath the field.
61 If the highlighted text matches what you are
62 looking for, double-click it or press \key{Enter}. The
63 \gui Documentation window displays the relevant topic. You rarely have
64 to type in the whole word before \QA finds a match. Note that for some
65 words there may be more than one possible topic that is relevant.
66
67 \section1 Using Free Text Search
68
69 \image assistant-search.png {Screenshot of the \QA search menu to
70 browse through documentation}
71
72 \QA also provides full text searching for finding specific words in the
73 documentation. To activate the full text search, either press \key(Alt+S)
74 or click the \gui{Search} tab on the sidebar. Then enter the term you are
75 looking for and click \gui{Search}. All documents containing the specified
76 term are listed.
77*/
78
79/*!
80 \if !defined(ASSISTANT_INTERNAL)
81 \nextpage Customizing Qt Assistant
82 \endif
83 \page assistant-details.html
84 \title Using Qt Assistant
85 \previouspage Qt Assistant Quick Guide
86
87 \image assistant-dockwidgets.png {Screenshot of Qt Assistant showing widgets
88 for documentation}
89
90 You can read documentation in the \gui Documentation window. To open a topic
91 in a new tab, right click it in the \gui Contents window to open a context
92 menu and select \gui {Open Link in New Tab}. All open topics are listed in
93 the \gui {Open Pages} window. Select a topic to view it in the
94 \gui Documentation window.
95
96 If you want the \gui{Documentation} window to use as much space as possible,
97 you can easily group, move or hide the sidebar windows. To group the windows,
98 drag one on top of the other and release the mouse. If one or all sidebar
99 windows are not shown, select keyboard shortcuts to display them. You can
100 view the keyboard shortcuts in the \gui View menu.
101
102 The sidebar windows can be docked into the main window, so you can drag them
103 to the top, left, right or bottom of the main window, or you can
104 drag them outside \QA to float them as independent windows.
105
106 To change the font family and font sizes of the browser window displaying
107 the documentation or the application itself, select \gui Edit >
108 \gui Preferences > \gui Fonts.
109
110 \image assistant-preferences-fonts.png {Screenshot showing the preference menu
111 of the \QA to change font settings}
112
113 To temporarily increase or decrease the font size in the \gui Documentation
114 window, select \gui View > \gui {Zoom in} or \gui {Zoom out}. To reset the
115 font size, select \gui View > \gui {Normal Size}.
116
117 To navigate between pages, select \gui Go > \gui Previous or \gui Next. This
118 takes you to the previous or next page in the history. To return to the home
119 page, select \gui Go > \gui Home. To specify the home page, select
120 \gui Edit > \gui Preferences > \gui Options.
121
122 To synchronize the \gui{Contents} window with the page currently shown in
123 the \gui{Documentation} window, select \gui Go >
124 \gui {Sync with Table of Contents}.
125
126 The address toolbar provides a fast way to enter a specific URL for a
127 documentation file. To show the address toolbar, select \gui View >
128 \gui Toolbars > \gui {Address Toolbar}.
129
130 \section1 Searching from Page Contents
131
132 To find text on the current page, select \gui Edit > \gui {Find in Text}.
133 Enter the search term in the field. The search is incremental, meaning that
134 the most relevant result is shown as you enter characters into the field.
135
136 If you select the \gui{Case sensitive} checkbox, the search considers the
137 case of the search term. For example, if you search for \b spin, it matches
138 \b spin but not \b Spin.
139
140 To search forwards or backwards from your current position on the page,
141 click \gui Previous or \gui Next.
142
143 To hide the find control, either click \gui Close or press \key Esc.
144
145 \section1 Full Text Searching
146
147 \img assistant-search.png {Screenshot of the \QA search menu to
148 browse through documentation}
149
150 \QA provides a powerful full text search engine. You can search for certain
151 words or text in the \gui Search window. Enter the text you want to look for
152 and press \key{Enter} or click \gui{Search}. The search is not case sensitive.
153 For example, \b Foo, \b fOo and \b FOO are all treated as the same.
154
155 You can create complex queries using the
156 \l{https://sqlite.org/fts5.html#full_text_query_syntax}{FTS query syntax}.
157
158 The following are examples of common search patterns:
159
160 \list
161 \li \c deep -- lists all the documents that contain the word \b deep
162 \li \c{deep*} -- lists all the documents that contain a word beginning
163 with \b deep
164 \li \c{deep copy} -- lists all documents that contain both \b deep \e
165 and \b copy
166 \li \c{"deep copy"} -- list all documents that contain the phrase
167 \b {deep copy}
168 \endlist
169
170 The list of documents found is ordered according to the number of
171 occurrences of the search text which they contain, with those containing
172 the highest number of occurrences appearing first. Simply click any
173 document in the list to display it in the \gui{Documentation} window.
174
175 If the documentation has changed \mdash for example, if documents have been added
176 or removed \mdash \QA will index them again.
177
178 \section1 Filtering Help Contents
179
180 \QA allows you to install any kind of documentation as long as it is organized
181 in Qt compressed help files (*.qch). For example, you can view
182 Qt reference documentation for several Qt versions at the same time. In many
183 respects, this is very convenient since only one version of \QA is needed.
184 However, at the same time it becomes more complicated when performing tasks like
185 searching the index because most keywords are defined in more than one Qt
186 version. This means that \QA will always ask the user to choose which one
187 should be displayed.
188
189 We use documentation filters to solve this issue. A filter is identified by its
190 name, and contains a list of filter attributes. An attribute is just a string and
191 can be freely chosen. Attributes are defined by the documentation itself,
192 which means that every documentation set usually has one or more attributes.
193
194 For example, the \QA documentation defines the attributes \c {assistant} and
195 \c{tools}, whereas \QD defines \c{designer} and \c{tools}.
196 The filter to display all tools would then define only the attribute
197 \c{tools} since this attribute is part of both documentation sets.
198 Adding the attribute \c{assistant} to the filter would then only show \QA
199 documentation since the \QD documentation does not contain this
200 attribute. Having an empty list of attributes in a filter will match all
201 documentation. That is, it is equivalent to requesting unfiltered documentation.
202
203 To create and remove documentation filters, select \gui Edit >
204 \gui Preferences > \gui Filters.
205
206 \image assistant-preferences-filters.png {Screenshot showing the preference menu
207 of the \QA to filter which categories should be shown}
208
209 To add a new filter, click \gui Add,
210 specify a filter name, and click \gui OK. Then select the filter attributes
211 in the \gui Attributes field.
212
213 To delete a filter, select it and click \gui Remove.
214
215 The filter toolbar allows you to apply a filter to the currently installed
216 documentation. To show the filter toolbar, select \gui View > \gui Toolbars
217 > \gui {Filter Toolbar}.
218
219 \section1 Adding Documentation
220
221 To install and remove compressed help files, select \gui Edit >
222 \gui Preferences > \gui Documentation.
223
224 \image assistant-preferences-documentation.png {Screenshot showing the preference menu
225 of the \QA to add or remove to the documentation list}
226
227 Click the \gui{Install} button and
228 choose the path of the compressed help file (*.qch) you would like to install.
229 To delete a help file, select a documentation set in the list and click
230 \gui{Remove}.
231
232 \section1 Specifying Home Page
233
234 To specify the homepage \QA displays when you click the \gui{Home} button,
235 select \gui Edit > \gui Preferences > \gui Options.
236
237 \image assistant-preferences-options.png
238
239 Enter the URL of the home page or select \gui{Current Page} to set the
240 currently displayed page as your home page. To leave the home page blank,
241 select \gui {Blank page}. Select \gui{Restore to default} to reset your home
242 page to the default home page.
243
244 \section1 Using Command Line Options
245
246 \QA handles the following command line options:
247
248 \table
249 \header
250 \li Command Line Option
251 \li Brief Description
252 \row
253 \li -collectionFile <file.qhc>
254 \li Uses the specified collection file instead of the default one.
255 \row
256 \li -showUrl <URL>
257 \li Shows the document referenced by URL.
258 \row
259 \li -enableRemoteControl
260 \li Enables \QA to be remotely controlled.
261 \row
262 \li -show <widget>
263 \li Shows the specified sidebar window which can be "contents", "index",
264 "bookmarks" or "search".
265 \row
266 \li -hide <widget>
267 \li Hides the specified sidebar window which can be "contents", "index",
268 "bookmarks" or "search".
269 \row
270 \li -activate <widget>
271 \li Activates the specified sidebar window which can be "contents",
272 "index", "bookmarks" or "search".
273 \row
274 \li -register <doc.qch>
275 \li Registers the specified compressed help file in the given help
276 collection.
277 \row
278 \li -unregister <doc.qch>
279 \li Unregisters the specified compressed help file from the given
280 collection file.
281 \row
282 \li -remove-search-index
283 \li Purges the help search engine's index. This option is
284 useful in case the associated index files get corrupted.
285 \QA will re-index the documentation at the next start-up.
286 \row
287 \li -rebuild-search-index
288 \li Rebuilds the help search engine's index.
289 Note that this operation may take a while to finish.
290 \row
291 \li -setCurrentFilter <filter>
292 \li Sets the given filter as the active filter.
293 \row
294 \li -quiet
295 \li Does not show any error, warning or success messages.
296 \endtable
297
298*/