import QtQuick 1.0 import QtWebKit 1.0 Component { id: rcDelegate Item { id: delegateItem property real detailsOpacity : 0 property real minSize : 18 width: parent.width; height: 120 Rectangle { id: background x: 2; y: 2; width: parent.width - x*2; height: parent.height - y*2 // color: "#c0c0c0" // border.color: "#606060" radius: 3 //opacity: delegateItem.detailsOpacity gradient: Gradient { GradientStop { position: 0 color: "#7d7b97" } GradientStop { position: 1 color: "#313f4d" } } } MouseArea { anchors.fill: parent onClicked: { delegateItem.state = 'Details'; timer.stop(); loader.sourceComponent = webViewPage; } } Row { id: topLayout //anchors.verticalCenter: parent.verticalCenter spacing: 5 width: parent.width-10 height: parent.height-4 x: 5 Column { ///anchors.verticalCenter: parent.verticalCenter ///anchors.margins: 5 width: parent.width height: parent.height //width: 2*parent.width/3 Text { anchors.margins: 5 id: innerTxt width: delegateItem.width; text: title color: "white" font.pixelSize: delegateItem.minSize+2 font.bold: true wrapMode: Text.WrapAtWordBoundaryOrAnywhere // opacity: delegateItem.detailsOpacity } Row { spacing: 5 Column { Text { text: comment width: delegateItem.width; color: "White" font.pixelSize: delegateItem.minSize wrapMode: Text.WrapAtWordBoundaryOrAnywhere // opacity: delegateItem.detailsOpacity } } } Row { spacing: 5 width: parent.width ///anchors.bottom: parent.bottom Column { width: parent.width/2-2 Text { text: user color: "white" //font.bold: true font.pixelSize: delegateItem.minSize anchors.left: parent.left } } Column { width: parent.width/2-2 Text { text: timestamp color: "White" font.pixelSize: delegateItem.minSize anchors.right: parent.right //opacity: delegateItem.detailsOpacity } } } } } Item { id: details x: 0; width: parent.width //- 20 anchors { top: topLayout.top; topMargin: 0; bottom: parent.bottom; bottomMargin: 0 } // anchors.margins: 10 opacity: delegateItem.detailsOpacity //opacity: webView.progress == 1.0 ? 0.0 : 1.0 Grid { columns: 1 //3 id: pages height: parent.height; width: parent.width Component { id: webViewPage //Content.ParseModel { id: parseModel } Rectangle { //width: webView.width //height: webView.height //border.color: "gray" //color: "red" /* Content.ParseModel { id: parseModel } WebView { id: webView width: details.width height: details.height-60 newWindowComponent: webViewPage newWindowParent: pages //url: "http://en.wikipedia.org/w/index.php?title=" + innerTxt.text //url: "http://fr.wikipedia.org/w/api.php?action=parse&page="+innerTxt.text +"&format=xml" function getArticle(title) { parseModel.reload(); var article = parseModel.get(0).article; console.debug("=>>>>innerText"+title); return article; } html: getArticle(innerTxt.text) } */ ParseModel { id: parseModel } ListView { id: lstTest anchors.fill: parent model: parseModel delegate: //Text { text: article } Rectangle { color: "green" width: details.width height: details.height /* Flickable { id: flickable width: parent.width height: parent.height contentWidth: Math.max(flickable.width,webView.width) contentHeight: Math.max(flickable.height,webView.height) pressDelay: 100 */ WebView { id: webView transformOrigin: Item.TopLeft // smooth: false // We don't want smooth scaling, since we only scale during (fast) transitions // focus: true width: parent.width height: parent.height newWindowComponent: webViewPage newWindowParent: pages //color:"white" html: "