import QtQuick 1.0 import QtWebKit 1.0 Item { id: newsCommentsRect width: window.width; height: window.height function getNewsModelItem(prop) { if( typeof currentSource.listModels[componentDepth-1] != "undefined" ) if( typeof currentSource.listModels[componentDepth-1][prop] != "undefined" ) return currentSource.listModels[componentDepth-1][prop] return "" } property string commentURL: getNewsModelItem('commentURL') property string title: getNewsModelItem('title') property string image: getNewsModelItem('image') VisualItemModel { id: itemModel Column { id: column x: 10; y: 10 width: newsCommentsRect.width - 20 // height: newsCommentsRect.height Row { id: titleRow spacing: 5 Image { id: detailImage source: image } Text { anchors.verticalCenter: titleRow.verticalCenter text: title; width: column.width - detailImage.width - 10; wrapMode: Text.WordWrap font { bold: true; family: "Helvetica"; pointSize: 16 } } } WebView { id: newsCommentsWebView width: column.width url: commentURL preferredWidth: column.width // preferredHeight: parent.height - titleRow.height } } } ListView { id: itemListView anchors.fill: newsCommentsRect model: itemModel } ScrollBar { scrollArea: itemListView; height: itemListView.height; width: 8; anchors.right: itemListView.right } }