This is because the base QWidgets component that's being called can only support taking an icon string, not a URL. As a result, using icon.source produces no result in Button, ToolButton, RoundButton, CheckBox, and MenuItem. Simple test case: import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.13 Item { implicitWidth: 400 implicitHeight: 400 ColumnLayout { anchors.centerIn: parent Button { Layout.alignment: Qt.AlignHCenter text: "I wish I had an icon" icon.source: "https://dl.flathub.org/repo/logo.svg" } Button { Layout.alignment: Qt.AlignHCenter text: "Look at my beautiful icon" icon.name: "edit-bomb" } } }
Probably need to do it like Kirigami https://invent.kde.org/frameworks/kirigami/-/blob/master/src/icon.cpp#L402
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/67
Git commit 35e6076565d565922939eeca11e93abe67f7b664 by Nate Graham. Committed on 19/04/2021 at 21:11. Pushed by ngraham into branch 'master'. Draw icon in QQStyleItem Checkbox already knew how to do this, but it was doing so internally to itself. Let's move that logic to CheckDelegate.qml so that everything that uses it gains the same feature. This functionality can be optionally disabled in case a control using it already handles icon-drawing by itself. M +4 -4 org.kde.desktop/CheckBox.qml M +5 -2 org.kde.desktop/CheckDelegate.qml M +12 -1 org.kde.desktop/CheckIndicator.qml M +2 -0 org.kde.desktop/MenuItem.qml M +4 -4 org.kde.desktop/RadioButton.qml M +5 -2 org.kde.desktop/RadioDelegate.qml https://invent.kde.org/frameworks/qqc2-desktop-style/commit/35e6076565d565922939eeca11e93abe67f7b664
Still an issue despite that commit.
(In reply to Nate Graham from comment #4) Does https://github.com/nextcloud/desktop/issues/7419#issuecomment-2745794768 appear to be an example of this?
Is there any movement on this? If this is indeed a manifestation of the glitches in the nextcloud client then it is rather problematic as it makes the client look totally broken under KDE plasma (does not give a great image of plasma).
If there was, you'd see it reflected here. :)
(In reply to Nate Graham from comment #7) > If there was, you'd see it reflected here. :) Sure, thanks. It's just sometime depending what component are affected things move in separate places (e.g. invent / git / qtbug) and not always reported here (until say a fix). Also I was surprised Roke's question hadn't been answered.
(In reply to Gauthier from comment #8) > Also I was surprised Roke's question hadn't been answered. Thanks 🥲
Per https://github.com/nextcloud/desktop/issues/7419#issuecomment-2745794768, yes it looks like that issue is caused by this bug.
(In reply to Nate Graham from comment #10) Is that possible, since per https://github.com/nextcloud/desktop/issues/7419#issuecomment-2466272561, it also reproduces on Windows?
If they're shipping the qqc2-desktop-style on Windows, it would be the same issue, yes. If they're shipping a custom style on Windows that has the same issue as qqc2-desktop-style does, that would be another way for it to happen there.
*** Bug 509438 has been marked as a duplicate of this bug. ***
(In reply to Nate Graham from comment #12) > If they're shipping the qqc2-desktop-style on Windows, it would be the same > issue, yes. > > If they're shipping a custom style on Windows that has the same issue as > qqc2-desktop-style does, that would be another way for it to happen there. the issue is when running the nextcloud desktop client from a KDE Plasma workspace I currently use this workaround QT_QPA_PLATFORMTHEME=gtk3 ./nextcloud which is not ideal
Created attachment 185089 [details] KDE notification with a missing icon Unfortunately "QT_QPA_PLATFORMTHEME=gtk3 nextcloud" doesn’t solve the issue for me. I still get the missing icons. Also I have notice similar missing icons else in KDE, for exemplar in some (but not all) KDE connect notifications (see screenshot attached). Operating System: Fedora Linux 42 KDE Plasma Version: 6.4.4 KDE Frameworks Version: 6.17.0 Qt Version: 6.9.2 Kernel Version: 6.16.7-200.fc42.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 PRO 6650U with Radeon Graphics Memory: 32 GiB of RAM (30.7 GiB usable) Graphics Processor: AMD Radeon Graphics
(In reply to Gauthier from comment #15) > Created attachment 185089 [details] > KDE notification with a missing icon The screenshot shows the KDE Connect icon in the upper left In the body "Sensitive notification content hidden" Then a Reply button and a blank button / missing icon