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