Skip to content

Write, build, and load a QML UI w/ C++ backend module for Logos#283

Merged
kashepavadan merged 4 commits into
mainfrom
build-cpp-module
Jun 1, 2026
Merged

Write, build, and load a QML UI w/ C++ backend module for Logos#283
kashepavadan merged 4 commits into
mainfrom
build-cpp-module

Conversation

@kashepavadan
Copy link
Copy Markdown
Contributor

From: #219

Comment thread docs/core/journeys/build-a-logos-cpp-ui-module.md
calc_module.url = "github:logos-co/logos-tutorial?dir=logos-calc-module";

# Option B: point to your local checkout (for local development)
# calc_module.url = "path:../logos-calc-module";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this I got following error:
error: access to absolute path '/nix/store/logos-calc-module/flake.nix'

and solution was to use --override-input calc_module path:/absolute/path

did it work fine for you @kashepavadan ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it. Probably you would need to put the correct path here. Should I put it like

{your path here}?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your path here would do the trick

nix build 'github:logos-co/logos-basecamp' -o basecamp-result

# Launch once to preinstall bundled modules, then close it
./basecamp-result/bin/logos-basecamp
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
./basecamp-result/bin/logos-basecamp
./basecamp-result/bin/LogosBasecamp

install --file result-lgx/*.lgx

# Launch basecamp -- your modules appear alongside the built-in ones
./basecamp-result/bin/logos-basecamp
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
./basecamp-result/bin/logos-basecamp
./basecamp-result/bin/LogosBasecamp

test("calc_ui_cpp: loads and shows title", async (app) => {
await app.waitFor(
async () => {
await app.expectTexts(["Calculator C++ UI"]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
await app.expectTexts(["Calculator C++ UI"]);
await app.expectTexts(["Calculator (C++ backend)"]);

});

test("calc_ui_cpp: shows connection status", async (app) => {
await app.expectTexts(["Connecting to backend..."]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does't seem to exist at this point of tutorial as because on step 6 this gets removed, at least how I read it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this get removed in step 6?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here Replace the starter Main.qml


# Subsequent runs: invoke the bundled standalone wrapper directly,
# skipping nix entirely. DEV_QML_PATH still redirects QML loading.
DEV_QML_PATH=$PWD/qml ./result/bin/run-logos-standalone-ui
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DEV_QML_PATH=$PWD/qml ./result/bin/run-logos-standalone-ui
DEV_QML_PATH=$PWD/src/qml ./result/bin/run-logos-standalone-ui

Comment thread docs/core/journeys/build-a-logos-cpp-ui-module.md Outdated
Comment thread docs/core/journeys/build-a-logos-cpp-ui-module.md
@kashepavadan kashepavadan merged commit faa764f into main Jun 1, 2026
@kashepavadan kashepavadan deleted the build-cpp-module branch June 1, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants