0

我正在为 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", "@item:inlistbox", "Central Logo Focused"),
                        
                    },
                    {
                        'label': i18ndc("plasma_wallpaper_org.kde.plasma.random", "@item:inlistbox", "Central Logo Colored"),
                        
                    },
                    {
                        'label': i18ndc("plasma_wallpaper_org.kde.plasma.random", "@item:inlistbox", "Left to deside"),
                        
                    },
                    {
                        'label': i18ndc("plasma_wallpaper_org.kde.plasma.random", "@item:inlistbox", "Left to decide"),
                     
                    }
                ]
           }

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

1 回答 1

0

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

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

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

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

于 2021-01-19T21:02:38.717 回答