From db2f878018569f72472b7d49725ed5d42627f08c Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sun, 1 Feb 2026 13:44:43 -0500 Subject: [PATCH] Fix about page image loading. --- README.md | 3 +-- build.rs | 1 + {icons => images}/kilroy-256.png | Bin qml/ClideAboutWindow.qml | 2 +- qml/ClideTreeView.qml | 1 - resources.qrc | 5 +++++ 6 files changed, 8 insertions(+), 4 deletions(-) rename {icons => images}/kilroy-256.png (100%) create mode 100644 resources.qrc diff --git a/README.md b/README.md index f80aab6..133b943 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,6 @@ And of course, [Rust](https://www.rust-lang.org/tools/install). curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -## Dependencies - This project requires at least Qt 6.7. To check your Qt version ```bash @@ -144,6 +142,7 @@ Some helpful links for reading up on QML if you're just getting started. * [All QML Controls Types](https://doc.qt.io/qt-6/qtquick-controls-qmlmodule.html) * [KDAB CXX-Qt Book](https://kdab.github.io/cxx-qt/book/) * [github.com/KDAB/cxx-qt](https://github.com/KDAB/cxx-qt) +* [QML and C++ Intergration](https://doc.qt.io/qt-6/qtqml-cppintegration-overview.html) ### Plugins diff --git a/build.rs b/build.rs index 1d20876..29ac905 100644 --- a/build.rs +++ b/build.rs @@ -18,6 +18,7 @@ fn main() { .qt_module("Gui") .qt_module("Svg") .qt_module("Xml") + .qrc("./resources.qrc") .files(["src/gui/colors.rs", "src/gui/filesystem.rs"]) .build(); } diff --git a/icons/kilroy-256.png b/images/kilroy-256.png similarity index 100% rename from icons/kilroy-256.png rename to images/kilroy-256.png diff --git a/qml/ClideAboutWindow.qml b/qml/ClideAboutWindow.qml index feacdc3..6d02ec0 100644 --- a/qml/ClideAboutWindow.qml +++ b/qml/ClideAboutWindow.qml @@ -31,7 +31,7 @@ ApplicationWindow { anchors.top: parent.top anchors.margins: 20 - source: "../icons/kilroy-256.png" + source: "qrc:/images/kilroy.png" sourceSize.width: 80 sourceSize.height: 80 fillMode: Image.PreserveAspectFit diff --git a/qml/ClideTreeView.qml b/qml/ClideTreeView.qml index ea40c88..17d7e24 100644 --- a/qml/ClideTreeView.qml +++ b/qml/ClideTreeView.qml @@ -4,7 +4,6 @@ import QtQuick import QtQuick.Controls -import QtQuick.Layouts import clide.module 1.0 diff --git a/resources.qrc b/resources.qrc new file mode 100644 index 0000000..abfa83c --- /dev/null +++ b/resources.qrc @@ -0,0 +1,5 @@ + + + images/kilroy-256.png + + \ No newline at end of file