Results 1 to 3 of 3

Thread: Edit every thing of a QStringList separately.

  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Edit every thing of a QStringList separately.

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Edit every thing of a QStringList separately.

    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().

  3. #3
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Edit every thing of a QStringList separately.

    Ok, I made a loop and worked. Thank you

Similar Threads

  1. QTableView line edit clears the text on edit
    By PlasticJesus in forum Qt Programming
    Replies: 5
    Last Post: 14th March 2015, 19:06
  2. QTableWidget with its items stored separately
    By default user in forum Qt Programming
    Replies: 3
    Last Post: 13th July 2010, 21:46
  3. Phonon(video and audio separately)
    By Fastman in forum Qt Programming
    Replies: 3
    Last Post: 1st February 2010, 06:30
  4. Character encoding in text edit and llne edit
    By greenvirag in forum Qt Programming
    Replies: 3
    Last Post: 20th January 2009, 08:45
  5. Replies: 7
    Last Post: 2nd June 2006, 12:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.