Skip to content

Expose QUrl::toLocalFile() to Julia #232

@rakeshksr

Description

@rakeshksr

Currently, QUrl::toLocalFile() from Qt is not exposed in the Julia bindings while QUrl::fromLocalFile exposed.

When a user selects a file via a QML based file picker or drag-and-drop interface, the returned object is often a QUrl. To use this file in Julia we need the raw local path.

Current Workaround:

On Qml side

function toLocalFile(url) {
    return decodeURIComponent(url).replace(/^(file:\/{2,3})/, "");
}

julia_path = toLocalFile(qurl)
Julia.operationOnJuliaSide(julia_path)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions