<div class="gmail_quote">On Mon, Jul 9, 2012 at 7:42 PM, Heena Mahur <span dir="ltr"><<a href="mailto:hena18@rocketmail.com" target="_blank">hena18@rocketmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif"><div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">Hey,</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">

<h1 style="margin-top:0px;margin-right:0px;margin-bottom:7px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:23px;vertical-align:baseline;background-image:initial;font-family:'Trebuchet MS','Liberation Sans','DejaVu Sans',sans-serif;line-height:1.3;color:rgb(0,0,0);text-align:left">

<br></h1><div>I want to know how to create custom widget to change the attribute of xml node in qt ?</div><div>for eg-</div></div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">

<br></div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">when you click on one node let's take</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">

<image></div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">sorry <element></div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">

and let's say this is the line in the XML file</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px"><element><image src='ktuberling.svg' lang='any' /><pfound src='test.ogg' lang='any' /><word lang='any'>KTuberling</word></element></div>

<div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">then I want on the widget area something like</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">

type image</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">file ktuberling.svg (with the possibility to load from a file</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">

attribute lang any</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">and so on</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">

and this changes depending on which element you click</div><div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">Please elaborate in detail I am a beginner.</div>

<div style="font-family:arial,sans-serif;word-wrap:break-word;color:rgb(34,34,34);font-size:13px;line-height:15px">Thanks</div></div></div></div><br>_______________________________________________<br>
kde-edu mailing list<br>
<a href="mailto:kde-edu@mail.kde.org">kde-edu@mail.kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-edu" target="_blank">https://mail.kde.org/mailman/listinfo/kde-edu</a><br>
<br></blockquote></div><br><div>What you want to do, is to generate a model from the XML data. You can use QStandardItemModel for that. Note that you'll have to make sure you can write back the model afterwards.</div>

<div><br></div><div>As I said before, please don't start sending the e-mails to several mailing lists at the same time.</div><div><br></div><div>Aleix</div>