mirror of
https://github.com/mappu/miqt.git
synced 2025-01-21 06:00:38 +00:00
qprintsupport: add example
This commit is contained in:
parent
c6827726f7
commit
360696cff8
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
|
||||
|
29
examples/libraries/qt-qprintsupport/main.go
Normal file
29
examples/libraries/qt-qprintsupport/main.go
Normal file
@ -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()
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user