<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[use view model with only some edit lines]]></title><description><![CDATA[<p dir="auto">Hello,<br />
it's my first project with QT and I have got some lineEdits on my window and I want to update them using (file or read from USB device )<br />
So I want to make the model that can handle reading data from any source based on the clicked button and update the Line edits, and I want my design to follow the View model</p>
<p dir="auto">I found that QDataWidgetMapper.mapper() should take index -which does not exist in my case I don't use any tableview or trees ,<br />
What is the best practice to handle this case?<br />
also How can i validate user inputs to line Edit in the model view architecture ?</p>
]]></description><link>https://forum.qt.io/topic/116731/use-view-model-with-only-some-edit-lines</link><generator>RSS for Node</generator><lastBuildDate>Sat, 22 Aug 2026 07:46:46 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/116731.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Jul 2020 03:19:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to use view model with only some edit lines on Tue, 07 Jul 2020 15:21:23 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Please see<br />
<a href="https://doc.qt.io/qt-5/qtwidgets-itemviews-simplewidgetmapper-example.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qtwidgets-itemviews-simplewidgetmapper-example.html</a></p>
<p dir="auto">You can use a std item model and fill from your file/usb<br />
model = new QStandardItemModel(5, 3, this);</p>
<p dir="auto">or you can create a custom model that directly can also read itself from the "sources"<br />
<a href="https://doc.qt.io/qt-5/qabstractitemmodel.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qabstractitemmodel.html</a></p>
]]></description><link>https://forum.qt.io/post/605286</link><guid isPermaLink="true">https://forum.qt.io/post/605286</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Tue, 07 Jul 2020 15:21:23 GMT</pubDate></item><item><title><![CDATA[Reply to use view model with only some edit lines on Tue, 07 Jul 2020 14:55:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/7asna2">@<bdi>7asna2</bdi></a> any one can help</p>
]]></description><link>https://forum.qt.io/post/605276</link><guid isPermaLink="true">https://forum.qt.io/post/605276</guid><dc:creator><![CDATA[7asna2]]></dc:creator><pubDate>Tue, 07 Jul 2020 14:55:10 GMT</pubDate></item></channel></rss>