miqt/examples/libraries/qt-printsupport/main.go

30 lines
401 B
Go
Raw Permalink Normal View History

2024-10-18 20:45:54 +00:00
package main
import (
"os"
"github.com/mappu/miqt/qt"
"github.com/mappu/miqt/qt/printsupport"
2024-10-18 20:45:54 +00:00
)
func main() {
qt.NewQApplication(os.Args)
btn := qt.NewQPushButton3("QPrintSupport sample")
2024-10-18 20:45:54 +00:00
btn.SetFixedWidth(320)
btn.OnPressed(func() {
dlg := printsupport.NewQPrintDialog3()
2024-10-18 20:45:54 +00:00
dlg.OnFinished(func(int) {
dlg.DeleteLater()
})
dlg.Show()
})
btn.Show()
qt.QApplication_Exec()
}