Blackberry cascades不使用选项卡窗格显示qml文件

Blackberry cascades不使用选项卡窗格显示qml文件,qml,blackberry-10,blackberry-cascades,Qml,Blackberry 10,Blackberry Cascades,我在QML文件中有一个选项卡窗格布局,该布局添加到另一个QML文件中: attachedObjects: [ ComponentDefinition { id: attachmentViewer source: "EncryptedAttachmentViewer.qml" } ] 以下是文件内容: import bb.cascades 1.0 TabbedPane { showTabsOnAct

我在QML文件中有一个选项卡窗格布局,该布局添加到另一个QML文件中:

attachedObjects: [
        ComponentDefinition {
            id: attachmentViewer
            source: "EncryptedAttachmentViewer.qml"
        }
    ]
以下是文件内容:

import bb.cascades 1.0

TabbedPane {
    showTabsOnActionBar: true
    Tab {
        title: "Text"
        Page {
            id:page1

            Label {
                text: _messages.messageViewer.attachment.text
                multiline: true
            }
        }
    }
    Tab {
        title: "HTML"
        Page {
            id: page2
            ListView {
                dataModel: _messages.messageViewer.attachment.htmllist
                listItemComponents: [
                    ListItemComponent {
                        type: "item"

                        Container {
                            WebView {
                                html: ListItemData.html

                            }
                        }
                    }
                ]
            }
        }
    }
    Tab {
        title: "Attachments"
        Page {
            id: page3
            ListView {
                dataModel: _messages.messageViewer.attachment.attachmentlist
                listItemComponents: [
                    ListItemComponent {
                        type: "item"

                        Container {
                            id: itemRoot

                            Label {
                                text: ListItemData.name
                            }
                        }
                    }
                ]
                onTriggered: {
                    _messages.messageViewer.invoke(dataModel.data(indexPath).tmpfilename)
                }
            }
        }
    }
}
在此之前,这是一个顺序布局,但由于ScrollView中的Webview错误(Webview的长度接近无限长),我想迁移到选项卡式布局。所以唯一改变的是这个文件中的QML,其中的所有元素以前都在scrollview中工作过(除了webview,如上所述)


当我触发加载此文件时,使用
navigationPane.push(attachmentViewer.createObject())
在父qml文件中,不会发生任何事情。控制台中没有消息,但布局没有加载,而以前没有加载。选项卡窗格中是否有某些内容不允许不首先加载它?

选项卡窗格被设计为应用程序的第一页。不支持将其推入NavigationPane

您可以改用SegmentedControl

顺便说一句,这个错误实际上发生在ListView中的WebView,而不是ScrollView中的WebView。如果它能帮助你设计屏幕