Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fileio-demo.md #216

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/ch18-extensions/fileio-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ When the text is changed it is necessary to inform others about the change using

The write method does the same but opens the file in write mode and uses the stream to write the contents of the `text` property.

<<< @/docs/ch18-extensions/src/fileio/fileio.cpp#read
<<< @/docs/ch18-extensions/src/fileio/fileio.cpp#write

To make the type visible to QML, we add the `QML_ELEMENT` macro just after the `Q_PROPERTY` lines. This tells Qt that the type should be made available to QML. If you want to provide a different name than the C++ class, you can use the `QML_NAMED_ELEMENT` macro.

Expand Down