From 2f1e930668c1a2205a09ee835908d28b2bdedcdd Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 2 Feb 2018 18:13:27 +0100 Subject: Implement context menu for search results Subclass QTreeView to show a custom context menu. Since the depth of some items is > 1, add an option to expand and collapse a node recursively. --- searchdialog.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'searchdialog.h') diff --git a/searchdialog.h b/searchdialog.h index 0ef4aad..b5b9ba4 100644 --- a/searchdialog.h +++ b/searchdialog.h @@ -8,6 +8,7 @@ class QComboBox; class QTreeView; class QStandardItemModel; class QStandardItem; +class SearchView; class SearchDialog : public QDialog { Q_OBJECT @@ -37,8 +38,8 @@ class SearchDialog : public QDialog { void doActorGenres(QStandardItem *item); QLineEdit *mSearch; QComboBox *mTypeSel; - QTreeView *mResV; - QTreeView *mDataV; + SearchView *mResV; + SearchView *mDataV; QStandardItemModel *mResM; QStandardItemModel *mDataM; }; -- cgit v1.2.3-70-g09d2