jryannel / qt5-cadaques Goto Github PK
View Code? Open in Web Editor NEWRepo for Qt5 Cadaques Project
Repo for Qt5 Cadaques Project
back-link: ch04/index.html#input-elements
We start of with the text editing elements
I think you mean;
We start off with the text editing elements
back-link: ch04/index.html#components
Coverage here is fine the way it is done, but perhaps a stronger hint a more advanced model usage later on in the model-view section?
back-link: ch04/index.html#quick-starter
s/an overview about QML/an overview of QML/
s/Later we will have a short look onto how to/Later briefly look at how to/
s/arrange lements/arrange elements/
s/look onto elements/look at elements/
I won't repeat suggestions that are the same to save us all time.
Suggestion: g/look onto/look at/
back-link: ch04/index.html#simple-transformations
back-link: ch04/index.html#item-element
I think you should elaborate a little bit more about the Item element.
Event though you have put the following statement at the end of the section, "An item has many fundamental properties, we will introduce most of them over the course of the book.", I still think you should list some properties because you mention geometry.
For example:
The Item doesn't do any painting by itself but has a lot of properties that is used to affect the visual appearance, among others, anchoring, geometry, rotation, scaling and opacity.
This makes it more clear that the Item actually have a lot of functionality for visual items.
I wouldn't call Item and MouseArea visual.
They have a geometry, but that's it...
In detail:
a. QObject non visual, no geometry
b. QDeclarativeItem default: non visual, geometry
c. QDeclarativeItem with contents: visual, geometry
The difference between b and c is, if this flag is set or not:
QGraphicsItem::ItemHasNoContents
back-link: ch04/index.html#item-element
dependent vs. depending ... it's hard to really get it right ... therefor
"A bound property is updated, when one off the properties, it depends on, changes."
...not sure about the ',' ;)
back-link: ch04/index.html#properties
back-link: ch04/index.html#image-element
Even if QDecalarativeImageProvider is not or is later explained, add at least a note here. It gave me quite a headache when I wanted to use an Image element with dynamically generated content and without having to write it somewhere in the filesystem. Would have been easier if I had at least know this class and what its purpose is at that time.
back-link: ch04/index.html#rectangle-element
"Additonal it supports borders defined by color and width": could be missleading, because "Rectangle" also supports those properties, hence "border.color" and "border.width" might be better.
back-link: ch04/index.html#qml-syntax
s/QML is a declarative language to describe/QML is a declarative language used to describe/
back-link: ch04/index.html#item-element
Probably you need to mention the natural and the z-order of Items.
For example, later in the chapter (Simple Transformations) you have a MouseArea as a background and three rockets that you can click. Why does this "just work" both graphics and click-wise.
back-link: ch04/index.html#properties
Did not know about the 'default' keyword. Very interesting. But perhaps you could also mention the property alias? Another very useful feature I discovered more or less by coincidence.
back-link: ch04/index.html#properties
no idea if something like that is important ... but the right grama syntax would be:
[default] property [: defaultValue]
... the [default] can be left out.
back-link: ch04/index.html#properties
back-link: ch04/index.html#properties
s/A property has default a value and a well-defined type./A property has a default value and a well-defined type./
s%// (7) Keys is a attached property%// (7) KeyNavigation is an attached property%
btw, "focus: true" has nothing to do with attached properties, so it should be placed before the comment above.
back-link: ch04/index.html#text-element
Nice things to mention in this section is alignment, elide, format and style.
I do also believe that you should put a note about the difference of using anchoring to align the text compared to hor/vert-alignment
There are 2 side to the phrase "default value" ... in in qml-space you should only use the second one:
As the second one is very important to understand if you want to become a qml-hero it's dangarouse to "flood" people with 1. ;)
Either remove all statments about it, or find another word for it ;)
back-link: ch04/index.html#properties
back-link: ch04/index.html#rectangle-element
You should mention where the list of color names comes from. (Looks like rgb.txt to me.)
s/premanufactured/predefined/
back-link: ch04/index.html#properties
back-link: ch04/index.html#mousearea-element
s/By this it allows you to show the user an interface element, but the interaction are can be larger./By this it allows you to show the user an interface element, but the interaction can be larger./
(remove "are") - but still hard to digest.
back-link: ch05/index.html#fluid-elements
This comes together with a system to describe your user interface using states. Where each state defines property changes and can be enhanced with transitions, ...
Either us comma instead of full stop: ... states, where ...
or remove "Where" -> ... states. Each state defines ...
back-link: ch04/index.html#scripting
There are many spelling errors / typos that a spell-checker could easily find (like gop, propertis, proeprty, choosen etc.)
actually that's wrong.
The key word is dynamic scoping ... at powerful, dempting and extermly dangarous pattern which one can't turn off :(
To some extend your write: It's very important to only reference elements inside YOUR qml document, altough nobody forces you to.
This should be a "tip" or something
"An element is declared by it’s name followed by { }"
isn't it "type" or "name of the component" ... it's not the name of the element.
It's a minor perspective thing ... but I think "type" would be easier to understand
back-link: ch04/index.html#properties
back-link: ch04/index.html#rectangle-element
"Note
It is not possible to create an angled gradient. For this it’s better to use premanufactured images"
Maybe also worth noting that horizontal gradients can be created by rotating the item by 90 degrees?
back-link: ch04/index.html#properties
At position 8 in the numbered list: 'For every property you can provide an event handler.'
I think that this should be 'signal handler' and not 'event handler'
back-link: ch04/index.html#layout-items
...stronger then competing geometry...
should be:
...stronger than competing geometry...
back-link: ch04/index.html#text-element
It’s most notable property... Should probably be 'Its'
The element calculates it’s initial... Probably here too
back-link: ch04/index.html#positioning-elements
The final positioner is flow.
Should be:
The final positioner is Flow.
back-link: ch04/index.html#qml-syntax
back-link: ch04/index.html#properties
Check it out
back-link: ch04/index.html#simple-transformations
"It’s always better to scale images down then up."
Should this be a side note? Could it also include an explanation why this is the case?
Also found a typo: s/then/than
back-link: ch04/index.html#scripting
I think that you should highlight and elaborate on "The difference between QML : and JS = is, the binding is a contract and keeps true. The JS = is a one-time assignment.". It's a big difference between property binding and assignment.
back-link: ch04/index.html#scripting
See
"// (1) handler for text changes
onTextChanged: console.log("text changed:", text)"
back-link: ch04/index.html#text-element
s/It’s most notable property is the text property or type string. The element calculates it default with and height based on the given text and the font used./It’s most notable property is the text property of type string. The element calculates its default width and height based on the given text and the font used./
(or->of, it=>its, with->width)
back-link: ch04/index.html#text-element
You should mention wrapping and whether (and how) to set a background color.
back-link: ch04/index.html#scripting
I'd rename count to increment and rename counter to spacePresses and change the key from Escape to Space.
back-link: ch05/index.html#animation-elements
I already noticed in the last chapter in the drag&drop note that you wrote you cannot drag an drop anchored elements, but did not say they can be 'unanchored' on-the-fly if necessary. Now you show all important animation elements, but again miss the AnchorAnimation. I am sure it will appear sooner or later, but why not put it into the list?
back-link: ch04/index.html#basic-elements
back-link: ch04/index.html#qml-syntax
Current: Let’s start with a simple example of a qml file to explain the different syntax.
Should be: Let’s start with a simple example of a QML file to explain the different syntax.
back-link: ch04/index.html#qml-syntax
You don't explain why it is a good idea to name the root element "root". Why not "app" or "application" or "window"?
You don't explain why the id name is unquoted but the color name is quoted when both are single words.
You show how to run qmlscene on Unix-like systems but not on Windows. Also, you don't explain why you are using qmlscene rather than some other exectuable.
back-link: ch04/index.html#qml-syntax
s/QML is designed from the ground up to describe user interfaces not text-document./QML is designed from the ground up to describe user interfaces not text-documents./
"text-documents" (plural)
s/In general you always want to import QtQuick 2.0 as your default set as elements/In general you always want to import QtQuick 2.0 as your default set of elements/
Consistency: In the same list (above) either print a full stop at the end of each list element or remove it for each element.
back-link: ch04/index.html#qml-syntax
The filename for the rectangle example is 'rectangle.qml'. The common practice for naming QML-component files is to use camel-case. If the rectangle example is intended to be used as a 'stand-alone' application I would recommend changing the name to main.qml (or something similar) to make it clear for the user that this is an application and not a component.
I don't get the first sentence ... "our" as in "the writer and reader"? custom property as in "expression"?
Isn't it converted to a string value? ... it's not going to become a type, "it's changing" it's type to string
back-link: ch04/index.html#properties
back-link: ch04/index.html#positioning-elements
These are called positioners and the following are provided in QML Row, Column, Grid and Flow.
Correct me if I'm wrong but aren't positioners actually a part of QtQuick and not QML?
BlackBerry cascades uses QML but doesn't have positioners, unfortunately :)
back-link: ch04/index.html#image-element
s/An image using PreserveAspectCrop should also to enable the clippping to avoid image data to be painted outside the Image element boundaries./An image using PreserveAspectCrop should also enable clippping to avoid image data to be painted outside the Image element boundaries./
(remove "to", possibly "the", as well?)
back-link: ch04/index.html#components
s/
There are different way to create components in QML./
There are different ways to create components in QML./
(way->ways)
s/
Our task is now to extract the button ui in a reusable component./
Now our task is to turn the button UI into a reusable component/ ??
s/
You do this by imagine how you would like to use the button./
To do so, consider how you would like to use the button./ ??
s/
Also I would expect the button has a sensible default size/
Also I would expect the button to have a sensible default size/ ?
s/
Additional we need to export the properties a user might want to change on the root level./
Additionally we need to export the properties a user might want to change on the root level./
s/
For this is important to now, out the root level properties can be accessed from outside this file./
It is important to know, that only root level properties can be accessed from outside a component file/ ??
s/
We will introduce more such ui components and also come back the button theme later./
We will introduce more such ui components and also come back to the button theme later./
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.