The QTM search bar

Strict warning: Only variables should be passed by reference in book_prev() (line 559 of /home/qmrqffr/public_html/qtm/modules/book/book.module).
Submitted by Matthew Smith on Sun, 2008-02-17 00:32
::

QTM v0.5.8 introduced the "Foxhound" search bar, a Find tool similar to the one in a popular web browser. In QTM's case it's actually adapted from the source code of Qt Assistant, the Qt documentation browsing tool (I can do this, because Qt is released under an open-source licence).

The Find bar can be used in two ways - as part of QTM, or in your own programs.

Using Find in QTM

As with most windowed text-editing or text-viewing tools, you start Find by pressing Ctrl+F (i.e. holding down Ctrl while you press F and then releasing Ctrl). Pressing Ctrl+F again while the search bar is visible makes it go away again. As you enter the text you want to find, the tool searches without waiting for you to press Enter. To search for another occurrence of what you specified, press Enter again, or press Ctrl+G, which as with many such programs means "Find again" or "Find next". You can also do this when the search bar is invisible; it remembers what you typed even when it is invisible.

To clear the search bar and search for something new, just highlight everything by either double-clicking on what you typed, and then press Delete or Backspace and type whatever you want to search for next, or by right-clicking (or by holding down Ctrl and clicking, if you're on a Mac with an old-style one-button mouse) and clicking "Select all" from the menu that will appear. Once the text is highligted, you can type whatever you want to search for next.

QTM also allows you to search using regular expressions. This is a powerful text matching code widely used by programmers. This feature is turned off by default; to enable it, go into Preferences (from the File menu) and click the check-box next to "Enable expert search". Please note that regex searching is not dynamic in QTM; it waits for you to finish typing the regex and press Enter before searching.