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