예제 #1
0
파일: mainwindow.go 프로젝트: gooops/goqt
func (w *MainWindow) readSettings() {
	setting := ui.NewQSettingsWithOrganizationApplicationParent("GoQt", "Application Example", w)
	defer setting.Delete()
	pos := setting.ValueWithKeyDefaultvalue("pos", ui.NewQVariantWithPoint(ui.NewQPointWithXposYpos(200, 200))).ToPoint()
	size := setting.ValueWithKeyDefaultvalue("size", ui.NewQVariantWithSize(ui.NewQSizeWithWidthHeight(400, 400))).ToSize()
	w.Move(pos)
	w.Resize(size)
}
예제 #2
0
파일: mainwindow.go 프로젝트: gooops/goqt
func (w *MainWindow) writeSettings() {
	setting := ui.NewQSettingsWithOrganizationApplicationParent("GoQt", "Application Example", nil)
	setting.SetValue("pos", ui.NewQVariantWithPoint(w.Pos()))
	setting.SetValue("size", ui.NewQVariantWithSize(w.Size()))
}