<?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[do we have example show how to edit and display sqlite data in tableview in QML?]]></title><description><![CDATA[<p dir="auto">some article are very old ,my qt  version is 6.9.3+vs2022, the tableview component is also changed frequently, finally i cannot find a correct example to demostrate the sql database read and write in qml.</p>
]]></description><link>https://forum.qt.io/topic/163516/do-we-have-example-show-how-to-edit-and-display-sqlite-data-in-tableview-in-qml</link><generator>RSS for Node</generator><lastBuildDate>Mon, 04 May 2026 02:30:41 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163516.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Oct 2025 08:50:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to do we have example show how to edit and display sqlite data in tableview in QML? on Wed, 15 Oct 2025 10:58:43 GMT]]></title><description><![CDATA[<p dir="auto">QSqlTableModel + TableView sounds like what you need</p>
]]></description><link>https://forum.qt.io/post/832834</link><guid isPermaLink="true">https://forum.qt.io/post/832834</guid><dc:creator><![CDATA[GrecKo]]></dc:creator><pubDate>Wed, 15 Oct 2025 10:58:43 GMT</pubDate></item><item><title><![CDATA[Reply to do we have example show how to edit and display sqlite data in tableview in QML? on Wed, 15 Oct 2025 01:19:11 GMT]]></title><description><![CDATA[<p dir="auto">cannot post my model ,it says flaged as spam by <a href="http://Akismet.com" target="_blank" rel="noopener noreferrer nofollow ugc">Akismet.com</a>, so i replace with picture</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/7fadf0a2-00a3-45f2-9aba-8af604b3276f.jpg" alt="wechat_2025-10-15_091855_294.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/1b5d8022-6560-4a74-a8d2-6462b552341a.jpg" alt="wechat_2025-10-15_091357_511.jpg" class=" img-fluid img-markdown" /><br />
<img src="https://ddgobkiprc33d.cloudfront.net/d3b9459f-571d-46e9-be97-bb0a9e3584e1.jpg" alt="wechat_2025-10-15_091415_726.jpg" class=" img-fluid img-markdown" /><br />
<img src="https://ddgobkiprc33d.cloudfront.net/55d8b7bf-c19e-4785-b6e6-5d0a7a4750b7.jpg" alt="wechat_2025-10-15_091437_846.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/832810</link><guid isPermaLink="true">https://forum.qt.io/post/832810</guid><dc:creator><![CDATA[QtTester]]></dc:creator><pubDate>Wed, 15 Oct 2025 01:19:11 GMT</pubDate></item><item><title><![CDATA[Reply to do we have example show how to edit and display sqlite data in tableview in QML? on Wed, 15 Oct 2025 01:07:58 GMT]]></title><description><![CDATA[<p dir="auto">here is my code ,i open the database and add data manualy ,but i think the model does not connect  to the database, so no data is displayed in the view.</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/e74a6072-6b07-42f9-87f3-3af8f6697ea4.jpg" alt="wechat_2025-10-15_085631_078.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">main.qml</p>
<pre><code>import QtQuick
import QtQuick.Effects
import QtQuick.Controls
import QtQuick.Layouts
import Charts

ApplicationWindow {
    id:root
    width: 640
    height: 480
    visible: true
    color: 'white'
    title: qsTr("Hello World")

    footer: ToolBar {
        id: statusBar
        height: 30

        Label {
            id: statusLabel
            anchors.fill: parent
            anchors.leftMargin: 10
            verticalAlignment: Text.AlignVCenter
            text: "ready"
        }
    }

    // table
    SqlTable{
        anchors.fill: parent
    }

}

</code></pre>
]]></description><link>https://forum.qt.io/post/832809</link><guid isPermaLink="true">https://forum.qt.io/post/832809</guid><dc:creator><![CDATA[QtTester]]></dc:creator><pubDate>Wed, 15 Oct 2025 01:07:58 GMT</pubDate></item><item><title><![CDATA[Reply to do we have example show how to edit and display sqlite data in tableview in QML? on Tue, 14 Oct 2025 19:18:00 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">From a quick look at the documentation, i think you can start with:</p>
<ul>
<li><a href="https://doc.qt.io/qt-6/qtquick-modelviewsdata-modelview.html#changing-model-data" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/qtquick-modelviewsdata-modelview.html#changing-model-data</a> on how to configure your delegate to be read/write<br />
And for the model:</li>
<li><a href="https://wiki.qt.io/How_to_Use_a_QSqlQueryModel_in_QML" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.qt.io/How_to_Use_a_QSqlQueryModel_in_QML</a> to give you a base for a read-only model<br />
Implement the <code>setData</code> for your custom model</li>
</ul>
<p dir="auto">Note I haven't done that yet, it's just putting some elements together.</p>
<p dir="auto">Hope it helps</p>
]]></description><link>https://forum.qt.io/post/832803</link><guid isPermaLink="true">https://forum.qt.io/post/832803</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 14 Oct 2025 19:18:00 GMT</pubDate></item></channel></rss>