From 2393a40ccd455cc2dca410e8a1830856dbfde12d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 22 Apr 2021 11:29:08 +0200 Subject: Rewrite the fetchmore example - Start in root folder so that large directories (/bin/, Windows) are easily reachable - Remove the line edit and navigate by double clicking instead since this is more in line with expectations - Use a QPlainTextEdit for logging - Make the log message more informative - Add icons Change-Id: Ia3cd7fc143efef80772923291f0b711913aa47be Reviewed-by: Paul Wicking --- examples/widgets/doc/src/fetchmore.qdoc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'examples/widgets/doc') diff --git a/examples/widgets/doc/src/fetchmore.qdoc b/examples/widgets/doc/src/fetchmore.qdoc index a27efaf071..940a252319 100644 --- a/examples/widgets/doc/src/fetchmore.qdoc +++ b/examples/widgets/doc/src/fetchmore.qdoc @@ -34,15 +34,9 @@ \image fetchmore-example.png - - This example consists of a dialog where you can enter a directory - name in the \uicontrol Directory edit field. The application loads and - visualizes all files it finds as you are typing. It is not required - to press [Enter] to launch the search. - When you have large - or perhaps even infinite - data sets, you will need to add items to the model in batches, and preferably only - when the items are needed by the view (i.e., when they are visible + when the items are needed by the view (i.e., when they become visible in the view). In this example, we implement \c FileListModel - an item view @@ -50,6 +44,15 @@ Window, which sets up the GUI and feeds the model with directories. + The UI consists of a dialog with a list showing the contents + of the root directory. Directories can be navigated by double-clicking. + + At the bottom, there is a log window displaying messages when the view + asks the model for more data. + + To exercise it, navigate to a large directory (say \c /bin), and scroll + to the bottom. Log messages appear showing the data being retrieved. + Let's take a tour of \c {FileListModel}'s code. \section1 FileListModel Class Definition -- cgit v1.2.3