PDA

View Full Version : Edit every thing of a QStringList separately.



hakermania
17th August 2010, 20:38
Ok, so, as many of you know, in linux, in order to cd to a directory, if this dir has spaces you have to put a \ before you put the space or you have to put the whole directory into " " . With a QtFile::getOpenFileNames I get a QStringList which contains all the filenames. So, I have a Unix command-line program which needs to do something with these directories and has, as it is logical, it doesn't work if the directory has spaces. So, I have to take every QStringListVariable[x] and to edit it separately. How can I do this?:confused::confused::confused:

Lykurg
17th August 2010, 22:31
You can loop through your list using iterators or an index based approach as it is written in the Detailed Description of QStringList. Or use QStringList::replaceInStrings().

hakermania
18th August 2010, 01:02
Ok, I made a loop and worked. Thank you :);)