如何解决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,然后一次取消注释一个元素,直到找出导致问题的元素。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。