📄 assistant.leaf
字号:
\chapter IntroductionThis document introduces \QA, a tool for presenting on-linedocumentation. It also introduces the Qt Reference Documentation whichis accessible using \QA, or with a web browser. The document isdivided into the following sections:\list\i Introduction to the Qt Reference Documentation\i The 1 Minute Guide to using Qt Assistant\i Qt Assistant in More Detail\i Full Text Searching\i Adding Documentation to Qt Assistant\endlist\chapter Introduction to the Qt Reference DocumentationThe documentation for the Qt library is written in-line in the \File.cpp files by the developers themselves. The documentation teamrevises the documentation to ensure that it is accurate and usable,and to provide quality control. The documentation team also writes thelarger texts, such as the class descriptions that introduce a classalong with the concepts the class uses, as well as introducing thefunctions and properties that the class provides. The documentation focuses on the API rather than the internals, sincewe make great efforts to keep our API consistent and compatible witheach new version, but we may change the internals considerably to improveperformance and enhance functionality.The Qt Reference Documentation consists of almost 1,500 HTML pages(over 2,500 printed pages). The overwhelming majority of pagesdocument Qt classes. Since developers differ in the way theythink and work we provide a variety of approaches to navigating thedocumentation set: \list\i The \link classes.html All Classes\endlink page lists every classin Qt's public API, and consists of several hundred classes.\i The \link mainclasses.html Main Classes\endlink page lists theclasses you're most likely to use most often, and provides a muchshorter and more managable list than the All Classes list.\i The \link groups.html Grouped Classes\endlink page presents a listof groups, each of which leads to a list of related classes, forexample, the \link advanced.html Advanced Widgets\endlink list.\i The \link hierarchy.html Inheritance Hierarchy\endlink pagepresents a list of classes in terms of the hierarchy of Qt classes.\i The \link functions.html All Functions\endlink page lists all thefunctions provided by Qt classes, each one with links to the class(es)in which it appears.\endlistNo matter where you find yourself in the Qt documentation, you willfind extensive cross-referencing. Even snippets of example codecontain clickable links, so that for example, if you come across aclass declaration in a code example, the class name will be aclickable link to the class's documentation.In addition to the class documentation some of Qt's modules haveextensive descriptions, and there are many overview documents whichdescribe various aspects of the Qt library; all these are linked fromthe reference documentation home page. There are also two tutorialsand numerous example programs in the examples subdirectory of the Qtdistribution.\chapter The 1 Minute Guide to using Qt AssistantUnder Windows, \QA is available as a menu option on the Qt menu. OnUnix, run \c{assistant} from an xterm.When you start up \QA, you will be presented with a standardmain-window style application, with a menu bar and toolbar. Belowthese, on the left hand side is a navigation window called the \eSidebar, and on the right, taking up most of the space, is thedocumentation window. By default, the Qt Reference Documentation's homepage is shown in the documentation window.\QA works in a similar way to a web browser. If you click underlinedtext (which signifies a cross-reference), the documentation window willpresent the relevant page. You can bookmark pages of particularinterest and you can click the \Toolbutton Previous and \ToolbuttonNext toolbar buttons to navigate within the pages you've visited. Although \QA can be used just like a web browser to navigate through theQt documentation set, \QA offers a powerful means of navigation thatweb browsers don't provide. \QA uses an intelligent algorithm to indexall the pages in the documentation sets that it presents so that youcan search for particular words and phrases.To perform a search, click the \Toolbutton Index tab on the Sidebar(or click \Key Ctrl+I). In the 'Look For' line edit enter a word, e.g.'homedirpath'. As you type, words are found and highlighted in a listbeneath the line edit. If the highlighted text matches what you'relooking for, double click it, (or press \Key Enter) and thedocumentation window will display the relevant page. You rarely haveto type in the whole word before \QA finds a match.For some words there may be more than one possible page that isrelevant. For example, enter 'setenabled' in the 'Look For' line edit.As you type, words are found and highlighted in the list beneath theline edit, as before. Once the highlighted text matches what you'relooking for, double click it, (or press \Key Enter). In the case ofsetEnabled, it is a function name which occurs in several classes, soa dialog pops up listing the possible choices. Click the choice you'reinterested in (or move to it using the \Key Up and \Key Down arrowkeys and press \Key Enter). The relevant page will display in thedocumentation window. \chapter Qt Assistant in More Detail\section1 The SidebarThe sidebar provides three ways of navigating documentation:\list 1\i The \Toolbutton Contents tab presents a tree view of thedocumentation sets that are available. If you click an item, itsdocumentation will appear in the documentation window. If you doubleclick an item or click a '+' sign to the left of an item, the item'ssub-items will appear. Click a sub-item to make its page appear in thedocumentation window. Click a '-' sign to the left of an item to hideits sub-items.\i The \Toolbutton Index tab is used to look up key words or phrases.See \l{The 1 Minute Guide to using Qt Assistant} for how to use thistab.\i The \Toolbutton Bookmarks tab lists any bookmarks you've made.Double click a bookmark to make its page appear in the documentationwindow. The \Toolbutton Bookmarks tab has a \Button{New Bookmark}button and a \Button{Delete Bookmark} button at the bottom. Click\Button{New Bookmark} to bookmark the page that is showing in thedocumentation window. Click a bookmark in the list, then click \Button{Delete Bookmark} to delete the highlighted bookmark.\i The \Toolbutton Search tab provides full text search of \e allthe documents. For further information see \l{Full Text Searching}.\endlistIf you want the documentation window to use as much space as possible,you can easily hide or show the Sidebar. If the Sidebar is showing,press \Key Ctrl+T, \Key Ctrl+I, \Key Ctrl+B or \Key Ctrl+S to hide it.If the Sidebar is hidden, press \Key Ctrl+T to show it on the Contentstab, or press \Key Ctrl+I to show it on the Index tab (with the focusin the 'Look For' line edit box), or press \Key Ctrl+B to show it onthe Bookmarks tab, or press \Key Ctrl+S to show it on the (full text)Search tab.The Sidebar is a dock window, so you can drag it to the top, left,right or bottom of \QA's window, or you can drag it outside \QA tofloat it.\section1 The ToolbarThe toolbar provides fast access to the most common actions.\list\i \Toolbutton Previous takes you to the previous page. The menuoption is \Menu Go|Previous and the keyboard shortcut is \Key{Alt+LeftArrow}.\i \Toolbutton Next takes you to the next page. The menuoption is \Menu Go|Next and the keyboard shortcut is \Key{Alt+RightArrow}.\i \Toolbutton Home takes you to the home page (normally the home pageof the Qt Reference Documentation). The menuoption is \Menu Go|Home and the keyboard shortcut is \Key{Ctrl+Home}.\i \Toolbutton Copy copies any selected text to the clipboard. The menuoption is \Menu Edit|Copy and the keyboard shortcut is \Key{Ctrl+C}.\i \Toolbutton{Find in Text} invokes the \Dialog{Find Text} dialog. The menuoption is \Menu{Edit|Find in Text} and the keyboard shortcut is \Key{Ctrl+F}.\i \Toolbutton{Print} invokes the \Dialog{Print} dialog. The menuoption is \Menu{File|Print} and the keyboard shortcut is \Key{Ctrl+P}.\i \Toolbutton{Zoom in} increases the font size. The menuoption is \Menu{View|Zoom in} and the keyboard shortcut is \Key{Ctrl++}.\i \Toolbutton{Zoom out} decreases the font size. The menuoption is \Menu{View|Zoom out} and the keyboard shortcut is \Key{Ctrl+-}.\endlistThe remaining toolbar buttons are bookmarks and will vary depending onyour configuration.\section1 The Menus\section2 The File Menu\list\i \Menu{File|Print} invokes the \Dialog{Print} dialog.\i \Menu{File|Exit} terminates \QA.\endlist\section2 The Edit Menu\list\i \Menu{Edit|Copy} copies any selected text to the clipboard.\i \Menu{Edit|Find in Text} invokes the \Dialog{Find Text} dialog.\i \Menu{Edit|Settings} invokes the \Dialog{Settings} dialog.\endlist\section2 The View Menu\list
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -