Wallpaper Plugin KDE等离子中的config.qml

问题描述

我正在为KDE Plasma开发墙纸插件。我已经编码了所有效果并对其进行了测试。运行良好。但是在对配置文件进行编码时,该配置在“配置墙纸”中根本没有显示。当我选择另一个插件时,它将显示出来,而当我再次选择该插件时,则不会加载配置。 这是代码。

import QtQuick 2.1
import QtQuick.Layouts 1.0
import QtQuick.Controls 1.0 as QtControls

// for "units"
import org.kde.plasma.core 2.0 as PlasmaCore


ColumnLayout {
    id: root
    property alias cfg_DisplayText: textField.text

    RowLayout {
        spacing: units.largeSpacing / 2

        // To allow aligned integration in the settings form,// "formAlignment" is a property injected by the config containment
        // which defines the offset of the value fields
        QtControls.Label {
            Layout.minimumWidth: width
            Layout.maximumWidth: width
            width: formAlignment - units.largeSpacing
            horizontalAlignment: Text.AlignRight

            // use i18nd in config QML,as the default textdomain is set to that of the config container
            text: i18nd("plasma_wallpaper_org.kde.plasma.random","Choose Effect")
        }
           QtControls.ComboBox {
        id: resizeComboBox
        Kirigami.FormData.label: i18ndc("plasma_wallpaper_org.kde.plasma.random","@label:listbox","Centre Logo Glow:")
        model: [
                    {
                        'label': i18ndc("plasma_wallpaper_org.kde.plasma.random","@item:inlistbox","Central Logo Shown"),},{
                        'label': i18ndc("plasma_wallpaper_org.kde.plasma.random","Central Logo Focused"),"Central Logo Colored"),"Left to deside"),"Left to decide"),}
                ]
           }

    Item { // tighten layout
        Layout.fillHeight: true
    }
}
}

解决方法

这意味着您的配置有错误。

您可以尝试在 konsole 会话中重新启动 KDE,以便您可以看到日志:

killall等离子壳; kstart5 等离子外壳

如果从日志输出中看不出哪里出了问题,请尝试注释掉大部分 config.qml,然后一次取消注释一个元素,直到找出导致问题的元素。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...