From d1a30be5abcc2d5e5340866434b2691275a135a6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 5 Jul 2016 13:26:53 +0200 Subject: Polish the findfiles example to be actually useful MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Simplify the code, remove unused members - Fix the translations of plurals to use %n - Add tooltip displaying full paths in list - Add context menu allowing to copy the name and open - Display the correct slashes on Windows - Connect the returnPressed() signals of the line edits - Make the search recursive - Do not search binary files by checking the mime type Change-Id: I3663799c88931db1f58c03ea35211e7ab03737ec Reviewed-by: Topi Reiniƶ --- examples/widgets/dialogs/findfiles/window.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'examples/widgets/dialogs/findfiles/window.h') diff --git a/examples/widgets/dialogs/findfiles/window.h b/examples/widgets/dialogs/findfiles/window.h index 89dd87b83b..119c0fa100 100644 --- a/examples/widgets/dialogs/findfiles/window.h +++ b/examples/widgets/dialogs/findfiles/window.h @@ -63,7 +63,9 @@ public: private slots: void browse(); void find(); + void animateFindClick(); void openFileOfItem(int row, int column); + void contextMenu(const QPoint &pos); private: QStringList findFiles(const QStringList &files, const QString &text); @@ -74,11 +76,7 @@ private: QComboBox *fileComboBox; QComboBox *textComboBox; QComboBox *directoryComboBox; - QLabel *fileLabel; - QLabel *textLabel; - QLabel *directoryLabel; QLabel *filesFoundLabel; - QPushButton *browseButton; QPushButton *findButton; QTableWidget *filesTable; -- cgit v1.2.3