summaryrefslogtreecommitdiffstats
path: root/examples/pdfwidgets/pdfviewer/searchresultdelegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pdfwidgets/pdfviewer/searchresultdelegate.h')
-rw-r--r--examples/pdfwidgets/pdfviewer/searchresultdelegate.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/pdfwidgets/pdfviewer/searchresultdelegate.h b/examples/pdfwidgets/pdfviewer/searchresultdelegate.h
new file mode 100644
index 000000000..dcf886111
--- /dev/null
+++ b/examples/pdfwidgets/pdfviewer/searchresultdelegate.h
@@ -0,0 +1,20 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef SEARCHRESULTDELEGATE_H
+#define SEARCHRESULTDELEGATE_H
+
+#include <QStyledItemDelegate>
+
+//! [0]
+class SearchResultDelegate : public QStyledItemDelegate
+{
+ Q_OBJECT
+public:
+ SearchResultDelegate(QObject *parent = nullptr);
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const override;
+};
+
+#endif // SEARCHRESULTDELEGATE_H