Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "QML"
uuid = "2db162a6-7e43-52c3-8d84-290c1c42d82a"
version = "0.13.0"
version = "0.13.1"
authors = ["Bart Janssens <bart@bartjanssens.org>"]

[deps]
Expand Down Expand Up @@ -30,7 +30,7 @@ MacroTools = "0.5"
Observables = "0.5"
Qt6Svg_jll = "6.10"
Qt6Wayland_jll = "6.10"
jlqml_jll = "0.10.0"
jlqml_jll = "0.10.2"
julia = "1.10"

[extras]
Expand Down
1 change: 1 addition & 0 deletions ext/Qt6Quick3DExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using Qt6Quick3D_jll

function __init__()
QML.loadqmljll(Qt6Quick3D_jll)
QML.add_plugin_path(Qt6Quick3D_jll)
end

end
8 changes: 1 addition & 7 deletions src/QML.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,7 @@ end

function add_plugin_path(m::Module)
pluginpath = joinpath(m.artifact_dir, "plugins")
separator = Sys.iswindows() ? ';' : ':'
oldpath = get(ENV, "QT_PLUGIN_PATH", "")
newpath = isempty(oldpath) ? pluginpath : oldpath * separator * pluginpath
ENV["QT_PLUGIN_PATH"] = newpath
@static if Sys.iswindows()
qputenv("QT_PLUGIN_PATH", QByteArray(newpath))
end
addLibraryPath(pluginpath)
end

# Persistent C++ - compatible storage of the command line arguments, passed to the QGuiApplication constructor
Expand Down
6 changes: 6 additions & 0 deletions test/labsplatform.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using QML
using Test

qmlfile = joinpath(dirname(@__FILE__), "qml", "labsplatform.qml")
loadqml(qmlfile)
exec()
36 changes: 36 additions & 0 deletions test/qml/labsplatform.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import QtQuick
import QtQuick.Controls
import Qt.labs.platform

ApplicationWindow {
visible: true
width: 320
height: 240

MouseArea {
anchors.fill: parent
acceptedButtons: Qt.RightButton
onClicked: zoomMenu.open()
}

Menu {
id: zoomMenu

MenuItem {
text: qsTr("Zoom In")
shortcut: StandardKey.ZoomIn
onTriggered: zoomIn()
}

MenuItem {
text: qsTr("Zoom Out")
shortcut: StandardKey.ZoomOut
onTriggered: zoomOut()
}
}

Timer {
interval: 1000; running: true; repeat: false
onTriggered: Qt.exit(0)
}
}
Loading