summaryrefslogtreecommitdiffstats
path: root/src/pdfquick
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdfquick')
-rw-r--r--src/pdfquick/PdfMultiPageView.qml13
-rw-r--r--src/pdfquick/doc/src/qtquickpdf-module.qdoc4
-rw-r--r--src/pdfquick/qquickpdfdocument.cpp5
3 files changed, 9 insertions, 13 deletions
diff --git a/src/pdfquick/PdfMultiPageView.qml b/src/pdfquick/PdfMultiPageView.qml
index 0f62a229d..10683f55d 100644
--- a/src/pdfquick/PdfMultiPageView.qml
+++ b/src/pdfquick/PdfMultiPageView.qml
@@ -298,14 +298,7 @@ Item {
property point jumpLocationMargin: Qt.point(10, 10) // px away from viewport edges
anchors.fill: parent
anchors.leftMargin: 2
- model: modelInUse && root.document ? root.document.pageCount : 0
- // workaround to make TableView do scheduleRebuildTable(RebuildOption::All) in cases when forceLayout() doesn't
- property bool modelInUse: true
- function rebuild() {
- modelInUse = false
- modelInUse = true
- }
- // end workaround
+ model: root.document ? root.document.pageCount : 0
rowSpacing: 6
property real rotationNorm: Math.round((360 + (root.pageRotation % 360)) % 360)
property bool rot90: rotationNorm == 90 || rotationNorm == 270
@@ -528,8 +521,8 @@ Item {
// and don't force layout either, because positionViewAtCell() will do that
if (pageNavigator.jumping)
return
- // make TableView rebuild from scratch, because otherwise it doesn't know the delegates are changing size
- tableView.rebuild()
+ // page size changed: TableView needs to redo layout to avoid overlapping delegates or gaps between them
+ tableView.forceLayout()
const cell = tableView.cellAtPos(root.width / 2, root.height / 2)
const currentItem = tableView.itemAtCell(cell)
if (currentItem) {
diff --git a/src/pdfquick/doc/src/qtquickpdf-module.qdoc b/src/pdfquick/doc/src/qtquickpdf-module.qdoc
index 1d31f6148..a4ca0d9e8 100644
--- a/src/pdfquick/doc/src/qtquickpdf-module.qdoc
+++ b/src/pdfquick/doc/src/qtquickpdf-module.qdoc
@@ -12,7 +12,7 @@
To use the types in this module, import the module with the following line:
- \code
+ \qml
import QtQuick.Pdf
- \endcode
+ \endqml
*/
diff --git a/src/pdfquick/qquickpdfdocument.cpp b/src/pdfquick/qquickpdfdocument.cpp
index 492c320d6..a9f0d196e 100644
--- a/src/pdfquick/qquickpdfdocument.cpp
+++ b/src/pdfquick/qquickpdfdocument.cpp
@@ -36,7 +36,10 @@ QQuickPdfDocument::QQuickPdfDocument(QObject *parent)
/*!
\internal
*/
-QQuickPdfDocument::~QQuickPdfDocument() = default;
+QQuickPdfDocument::~QQuickPdfDocument()
+{
+ delete m_carrierFile;
+};
void QQuickPdfDocument::classBegin()
{