Commit Graph

104 Commits

Author SHA1 Message Date
Axel Spoerl ba61af0bf3 Migrate documentviewer example into plugin based architecture
This patch changes the document viewer example to a plugin based
architecture.
It adapts the documentation accordingly.

Change-Id: Ia24028aa27e21fb8ab36f5ef3a9953be60858b19
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-02 10:11:06 +02:00
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 7c46fa7745 Remove unused variables in document viewer demo
This patch removes two unused data members and fixes
a documentation typo.

Pick-to: 6.5 6.5.0
Change-Id: I79fd66c727f2af54f1e13a33f8da2895b587663b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-09 16:39:46 +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