Commit Graph

2 Commits

Author SHA1 Message Date
Axel Spoerl d8e70effc9 Documentviewer demo: Don't use QPdfPageSelector in Qt 6.5
The document viewer demo uses QPdfPageSelector, which is available in
Qt 6.6 but not in 6.5. This is why the demo fails to compile in 6.5.

This patch adds ifdef'ry in order to compile without QPdfPageSelector
in 6.5.

Fixes: QTBUG-111982
Pick-to: 6.5 6.5.0
Change-Id: Iaad3e5705bba784b0ce69a7f6ddfabfbe4148e84
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-20 11:09:59 +01:00
Axel Spoerl 9bba48e1ca Add Json, text and pdf document viewer demo
Add a demo with a combined viewer for Json, pdf and text documents.
The example demonstrates how to create an application, utilizing
a main window with static and dynamic toolbars, menus and actions.

Type specific viewers inherit from an abstract viewer class.
The Json viewer implements an abstract tree model for QJsonDocument.

The example demonstrates a few useful application features, implemented
with QtWidgets and QSettings, to (re)store properties:
- Detecting file content types with QMimeDatabase
- Changing and restoring override cursor when hovering over a widget.
- Basic printing support.

Pick-to: 6.5 6.5.0
Change-Id: Ie411669cfdbc41ac399cd1aed87e60722195c42c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-09 11:55:22 +01:00