admin管理员组

文章数量:1122846

I want to set the panel icon of a custom widget but i can't figure out how. I have the icon that shows in the widget manager (on the left when in edit mode), but the icon in the panel is empty. (Mine is the empty gap on the right)

main.qml

import QtQuick 2.0
import org.kde.plasma.plasmoid
import org.kde.plasmaponents 3.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras

PlasmoidItem {
        Plasmoid.icon: "sensors-temperature-symbolic"

    // PlasmaExtras.Heading {
 //        anchors.horizontalCenter: parent.horizontalCenter
 //        text: "Temperature d adfds"
    // }
}

metadata.json

{
    "KPlugin": {
        "Authors": [
            {
                "Email": "[email protected]",
                "Name": "oosh"
            }
        ],
        "Category": "System Information",
        "Description": "Monitor the system temperature",
        "Icon": "sensors-temperature-symbolic",
        "Id": "au.oosh.temp-monitor",
        "Name": "Temperature Monitor",
        "Version": "0.4"
    },
    "X-Plasma-API": "declarativeappletscript",
    "KPackageStructure": "Plasma/Applet",
    "X-Plasma-API-Minimum-Version": "6.0"
}

Any help or guadance is appreciated. I'm very new to qml!

本文标签: qmlUnable to set the panel icon of an applet in plasmaStack Overflow