diff --git a/examples/libraries/qt-pdf/example.pdf b/examples/libraries/qt-pdf/example.pdf new file mode 100644 index 00000000..47141f88 Binary files /dev/null and b/examples/libraries/qt-pdf/example.pdf differ diff --git a/examples/libraries/qt-pdf/main.go b/examples/libraries/qt-pdf/main.go new file mode 100644 index 00000000..79812de7 --- /dev/null +++ b/examples/libraries/qt-pdf/main.go @@ -0,0 +1,27 @@ +package main + +import ( + "os" + + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/pdf" +) + +func main() { + + qt.NewQApplication(os.Args) + + d := pdf.NewQPdfDocument() + d.Load("example.pdf") + + p := pdf.NewQPdfView2() + p.SetWindowTitle("Qt 5 PDF Example") + p.SetMinimumSize2(650, 600) + p.SetPageMode(pdf.QPdfView__MultiPage) + p.SetZoomMode(pdf.QPdfView__FitInView) + p.SetDocument(d) + + p.Show() + + qt.QApplication_Exec() +} diff --git a/examples/libraries/qt-pdf/screenshot.png b/examples/libraries/qt-pdf/screenshot.png new file mode 100644 index 00000000..17cbfc68 Binary files /dev/null and b/examples/libraries/qt-pdf/screenshot.png differ diff --git a/examples/libraries/qt6-pdf/example.pdf b/examples/libraries/qt6-pdf/example.pdf new file mode 100644 index 00000000..47141f88 Binary files /dev/null and b/examples/libraries/qt6-pdf/example.pdf differ diff --git a/examples/libraries/qt6-pdf/main.go b/examples/libraries/qt6-pdf/main.go new file mode 100644 index 00000000..030e98c8 --- /dev/null +++ b/examples/libraries/qt6-pdf/main.go @@ -0,0 +1,27 @@ +package main + +import ( + "os" + + qt "github.com/mappu/miqt/qt6" + "github.com/mappu/miqt/qt6/pdf" +) + +func main() { + + qt.NewQApplication(os.Args) + + d := pdf.NewQPdfDocument() + d.Load("example.pdf") + + p := pdf.NewQPdfView2() + p.SetWindowTitle("Qt 6 PDF Example") + p.SetMinimumSize2(650, 600) + p.SetPageMode(pdf.QPdfView__MultiPage) + p.SetZoomMode(pdf.QPdfView__FitInView) + p.SetDocument(d) + + p.Show() + + qt.QApplication_Exec() +} diff --git a/examples/libraries/qt6-pdf/screenshot.png b/examples/libraries/qt6-pdf/screenshot.png new file mode 100644 index 00000000..05715ee0 Binary files /dev/null and b/examples/libraries/qt6-pdf/screenshot.png differ