September 15, 2011

spode spode
Ant Farmer
317 posts

[solved] deleting a line

 

i have this txt file:

lightblue
erklärung
Eine erklärung machen
Spiegazione

false
ENDB

green
bei

presso

false
ENDB

green
bei
sono nei pressi
ciao

true
ENDB

green
wort
das ist es
parola
questo è
false
ENDB

how can i delete a part of it, for example the following?
“green
bei

presso

false
ENDB

2 replies

September 15, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

Load it into memory, delete the content from the String in the memory and stroe it again. Directly deleting in the file is not possible.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

September 15, 2011

sriks sriks
Lab Rat
122 posts

If content is newline delimited, load it to QStringList and delete required items.

 
  ‹‹ Home screen widgets with QML      Scrolling the list while mouse is pressed in delegate ››

You must log in to post a reply. Not a member yet? Register here!