Skip to content

platform.labs is not added to path. simple fix #238

Closed

Description

@gilgulgamesh

This affects Windows harshly, I think Mac/Linux sort this themselves. This is quite annoying for personal users and rough for distribution. This seems to be about it running the bundled Qt, but QML trying to launch the extension from the system's Qt.

As labs is in a different directory, it need to be called somehow by qml or added to the user's path i guess... maybe literally just something like this in QML.jl to find it. (in the init?)

artifact_bin = joinpath(first(filter(d -> isdir(joinpath(d, "qml", "Qt", "labs", "platform")), 
	readdir(joinpath(first(Base.DEPOT_PATH), "artifacts"), join=true))), "bin")
sep = Sys.iswindows() ? ";" : ":"
ENV["PATH"] = artifact_bin * sep * ENV["PATH"]

Putting this in the REPL or at the top of the file I wish to run -- before using QML -- adds it to path for that terminal session, and fully fixes it afaik. Not tested on other platforms (dunno if needed)

Activity

  1. barche commented on Jun 10, 2026

    @barche
    Collaborator

    Is there a test or example that is affected by this, so I can verify the fix is working? Most likely this will need to be implemented at the level of the Qt JLLs.

  2. gilgulgamesh commented on Jun 11, 2026

    @gilgulgamesh
    Author

    Not one of your examples no, but i needed to make something with a tray icon, so labs was needed. The temporary path trick is very consistent though

  3. barche commented on Jun 12, 2026

    @barche
    Collaborator

    I don't use labs, so I need a MWE to test.

  4. gilgulgamesh commented on Jun 13, 2026

    @gilgulgamesh
    Author

    Oh i'm sorry, new to all this stuff. here, it's just the main .jl file in the repo but with that bit commented out.

  5. barche commented on Jun 18, 2026

    @barche
    Collaborator

    The problem was that the Qt6LabsPlatform was not in the products list in Qt6Declarative_jll. This should be fixed once JuliaPackaging/Yggdrasil#14013 goes through.

  6. gilgulgamesh commented on Jun 18, 2026

    @gilgulgamesh
    Author

    Awsome, thank you. loving this project.

  7. barche commented on Jun 20, 2026

    @barche
    Collaborator

    This should be fixed after doing Pkg.update().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions