diff --git a/.gitignore b/.gitignore index 67be7fe3..87bccef0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ examples/windowsmanifest/windowsmanifest examples/windowsmanifest/windowsmanifest.exe examples/uidesigner/uidesigner examples/uidesigner/uidesigner.exe +examples/libraries/qt-qprintsupport/qt-qprintsupport # android temporary build files android-build diff --git a/examples/libraries/qt-qprintsupport/main.go b/examples/libraries/qt-qprintsupport/main.go new file mode 100644 index 00000000..d3da7e65 --- /dev/null +++ b/examples/libraries/qt-qprintsupport/main.go @@ -0,0 +1,29 @@ +package main + +import ( + "os" + + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/qprintsupport" +) + +func main() { + + qt.NewQApplication(os.Args) + + btn := qt.NewQPushButton2("QPrintSupport sample") + btn.SetFixedWidth(320) + + btn.OnPressed(func() { + + dlg := qprintsupport.NewQPrintDialog2() + dlg.OnFinished(func(int) { + dlg.DeleteLater() + }) + dlg.Show() + }) + + btn.Show() + + qt.QApplication_Exec() +}