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 README.md #175

Merged
merged 3 commits into from
Sep 29, 2023
Merged
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
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ To run the examples, execute the following code block in the Julia REPL.

```julia
# Alternatively, execute the git command directly in the shell or download the zip file
isdir("QmlJuliaExamples") || run(`git clone --depth 1 https://github.com/barche/QmlJuliaExamples`)
import LibGit2
isdir("QmlJuliaExamples") || LibGit2.clone("https://github.com/barche/QmlJuliaExamples.git", "QmlJuliaExamples")
cd("QmlJuliaExamples/basic") # or images, opengl or plots instead of the basic subdirectory

# As an alternative to next three lines,
Expand All @@ -39,12 +40,10 @@ using Pkg
Pkg.activate(".")
Pkg.instantiate()

using QML
include(joinpath(dirname(pathof(QML)), "runexamples.jl"))
runexamples()
readdir() # Print list of example files
include("gui.jl") # Or any of the files in the directory
```

The above will run all the examples in series. To run a single example, include one of the files in the QmlJuliaExamples directory. For example, `include("board.jl")`.

### Loading a QML file
We support three methods of loading a QML file: `QQmlApplicationEngine`, `QQuickView` and `QQmlComponent`. These behave equivalently to the corresponding Qt classes.
Expand Down