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