Exemplo n.º 1
0
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)
}
Exemplo n.º 2
0
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()))
}