Skip to content

Commit 40739e1

Browse files
committed
Documentation spacing fixes.
1 parent 250377a commit 40739e1

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

doc.go

+25-25
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@
4242
//
4343
// The following logic demonstrates loading a QML file into a window:
4444
//
45-
// func main() {
46-
// err := qml.Run(run)
47-
// ...
48-
// }
49-
//
50-
// func run() error {
51-
// engine := qml.NewEngine()
52-
// component, err := engine.LoadFile("file.qml")
53-
// if err != nil {
54-
// return err
55-
// }
56-
// win := component.CreateWindow(nil)
57-
// win.Show()
58-
// win.Wait()
59-
// return nil
60-
// }
45+
// func main() {
46+
// err := qml.Run(run)
47+
// ...
48+
// }
49+
//
50+
// func run() error {
51+
// engine := qml.NewEngine()
52+
// component, err := engine.LoadFile("file.qml")
53+
// if err != nil {
54+
// return err
55+
// }
56+
// win := component.CreateWindow(nil)
57+
// win.Show()
58+
// win.Wait()
59+
// return nil
60+
// }
6161
//
6262
// Handling QML objects in Go
6363
//
@@ -71,9 +71,9 @@
7171
//
7272
// win := component.CreateWindow(nil)
7373
// win.On("visibleChanged", func(visible bool) {
74-
// if (visible) {
75-
// fmt.Println("Width:", win.Int("width"))
76-
// }
74+
// if (visible) {
75+
// fmt.Println("Width:", win.Int("width"))
76+
// }
7777
// })
7878
//
7979
// Information about the methods, properties, and signals that are available for QML
@@ -111,7 +111,7 @@
111111
// the following example demonstrates:
112112
//
113113
// qml.RegisterTypes("GoExtensions", 1, 0, []qml.TypeSpec{{
114-
// Init: func(p *Person, obj qml.Object) { p.Name = "<none>" },
114+
// Init: func(p *Person, obj qml.Object) { p.Name = "<none>" },
115115
// }})
116116
//
117117
// With this logic in place, QML code can create new instances of Person by itself:
@@ -150,13 +150,13 @@
150150
// For example:
151151
//
152152
// type Person struct {
153-
// Name string
153+
// Name string
154154
// }
155155
//
156156
// func (p *Person) SetName(name string) {
157-
// fmt.Println("Old name is", p.Name)
158-
// p.Name = name
159-
// fmt.Println("New name is", p.Name)
157+
// fmt.Println("Old name is", p.Name)
158+
// p.Name = name
159+
// fmt.Println("New name is", p.Name)
160160
// }
161161
//
162162
// In the example above, whenever QML code attempts to update the Person.Name field
@@ -177,7 +177,7 @@
177177
// a Paint method such as:
178178
//
179179
// func (p *Person) Paint(painter *qml.Painter) {
180-
// // ... OpenGL calls with the gopkg.in/qml.v1/gl/<VERSION> package ...
180+
// // ... OpenGL calls with the gopkg.in/qml.v1/gl/<VERSION> package ...
181181
// }
182182
//
183183
// A simple example is available at:

0 commit comments

Comments
 (0)