首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >壁纸插件中的config.qml

壁纸插件中的config.qml
EN

Stack Overflow用户
提问于 2020-09-12 13:45:09
回答 1查看 89关注 0票数 0

我正在为KDE等离子体开发一个壁纸插件。我已经对所有的效果进行了编码和测试。它运行得很好。但在对配置文件进行编码时,配置文件根本没有显示在配置墙纸中。当我选择另一个插件时,它会出现,当我再次选择这个插件时,配置不会加载。这是代码。

代码语言:javascript
复制
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
    }
}
}
EN

回答 1

Stack Overflow用户

发布于 2021-01-20 05:02:39

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

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

kstart5等弹壳

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63857250

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档