<?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[lineEdit with a csv file]]></title><description><![CDATA[<p dir="auto">I would like to write on qlineedit and save them in a csv file the problem is the code overwrites the old write in the csv and writes the new one, any idea please</p>
<p dir="auto">void Robot::on_pushButton_clicked()<br />
{<br />
QString note = QDateTime::currentDateTime().toString(QString("'%1/note de mission_'dd-MM-yyyy'.csv").arg(dossier));<br />
QFile filenote(note);<br />
if(filenote.open(QIODevice::WriteOnly | QIODevice:: Text)) {<br />
QTextStream n (&amp;filenote);<br />
n&lt;&lt;"Date et l'heure"&lt;&lt;";"&lt;&lt;"Commentaire"&lt;&lt;"\n";<br />
QString b = ui-&gt;lineEdit-&gt;text();<br />
QString d=QDateTime::currentDateTime().toString(QString("''dd-MM-yyyy'_'hh:mm:ss'"));<br />
n&lt;&lt;d&lt;&lt;";"&lt;&lt;b&lt;&lt;";"&lt;&lt;"\n";</p>
<p dir="auto">}<br />
}</p>
]]></description><link>https://forum.qt.io/topic/136184/lineedit-with-a-csv-file</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 08:37:22 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/136184.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Apr 2022 13:17:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to lineEdit with a csv file on Mon, 02 May 2022 09:04:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> solved thank you</p>
]]></description><link>https://forum.qt.io/post/712540</link><guid isPermaLink="true">https://forum.qt.io/post/712540</guid><dc:creator><![CDATA[jackfr]]></dc:creator><pubDate>Mon, 02 May 2022 09:04:58 GMT</pubDate></item><item><title><![CDATA[Reply to lineEdit with a csv file on Sat, 30 Apr 2022 07:23:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jackfr">@<bdi>jackfr</bdi></a><br />
That is why <a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> suggested you will want <em>append</em> mode when opening the file.</p>
]]></description><link>https://forum.qt.io/post/712321</link><guid isPermaLink="true">https://forum.qt.io/post/712321</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sat, 30 Apr 2022 07:23:13 GMT</pubDate></item><item><title><![CDATA[Reply to lineEdit with a csv file on Fri, 29 Apr 2022 13:51:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> thank you for your answer, i would like in fact every time i write on the lineedit and i click on the button, i can save this comment on the csv instead of overwriting the old one</p>
]]></description><link>https://forum.qt.io/post/712318</link><guid isPermaLink="true">https://forum.qt.io/post/712318</guid><dc:creator><![CDATA[jackfr]]></dc:creator><pubDate>Fri, 29 Apr 2022 13:51:49 GMT</pubDate></item><item><title><![CDATA[Reply to lineEdit with a csv file on Fri, 29 Apr 2022 13:38:32 GMT]]></title><description><![CDATA[<p dir="auto">See QFile::open()'s <a href="https://doc.qt.io/qt-5/qiodevice.html#OpenModeFlag-enum" target="_blank" rel="noopener noreferrer nofollow ugc">parameters</a>, esp. QIODevice::Append. Also you won't write the header every time.</p>
]]></description><link>https://forum.qt.io/post/712314</link><guid isPermaLink="true">https://forum.qt.io/post/712314</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Fri, 29 Apr 2022 13:38:32 GMT</pubDate></item></channel></rss>