You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Early in the book, there are a few places where the text uses the word "type" but almost certainly means "object." Under "Digesting a user interface," the book states:
a QML document needs to have one and only one root type
I suspect that this should say root object. Likewise, where it goes on to say
As QML doesn’t restrict the choice of type for the root type
Again the last word should be object.
The text also doesn't specify how Qt knows which object is the root; the example sets the object's ID to "root," which may mislead readers into thinking that this is a required and distinguishing specifier. We might add a note to the contrary (there is one that comes later), and point out that all other objects in the QML document will be nested within the root object's markup.
A couple more places where "type" is used where "object" should be used:
The id is a special and optional property that contains an identifier that can be used to reference its associated type elsewhere in the document.
That statement is actually incorrect; the ID is not an alias for a type. It's used to refer to the associated object.
It goes on to say:
Using root as the id for the root-type is a convention used in this book to make referencing the top-most type predictable in larger QML documents.
But should say,
"Using "root" as the ID for the root object is a convention used in this book to make referencing the topmost object predictable in larger QML documents.
I found quite a few other places where "type" is confused with "object," so I made changes and will submit a PR. Thanks!
The text was updated successfully, but these errors were encountered:
Stokestack
changed the title
Book refers to QML document's "root type" but should say "root object."
Book refers to QML document "type" but should say "object."
Nov 3, 2022
I can't find any way to link this issue to the PR: #210
The instructions here say there should be a "gear" icon in the sidebar under "Development," but there isn't.
Stokestack
changed the title
Book refers to QML document "type" but should say "object."
Book refers to QML "type" but should say "object."
Nov 3, 2022
Stokestack
changed the title
Book refers to QML "type" but should say "object."
Intro refers to QML "type" but should say "object."
Nov 3, 2022
Early in the book, there are a few places where the text uses the word "type" but almost certainly means "object." Under "Digesting a user interface," the book states:
I suspect that this should say root object. Likewise, where it goes on to say
Again the last word should be object.
The text also doesn't specify how Qt knows which object is the root; the example sets the object's ID to "root," which may mislead readers into thinking that this is a required and distinguishing specifier. We might add a note to the contrary (there is one that comes later), and point out that all other objects in the QML document will be nested within the root object's markup.
A couple more places where "type" is used where "object" should be used:
That statement is actually incorrect; the ID is not an alias for a type. It's used to refer to the associated object.
It goes on to say:
But should say,
"Using "root" as the ID for the root object is a convention used in this book to make referencing the topmost object predictable in larger QML documents.
I found quite a few other places where "type" is confused with "object," so I made changes and will submit a PR. Thanks!
The text was updated successfully, but these errors were encountered: