Results 1 to 5 of 5

Thread: Remove a string from QStringList

  1. #1
    Join Date
    May 2009
    Posts
    94
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Post Remove a string from QStringList

    How can i remove a QString from QStringList.
    stringList.remove(); is not working. It is giving a error that remove is not a member of QStringList.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Remove a string from QStringList

    Use QList::removeAt() or QList::removeAll(). And read the docs next time if you can't guess the method name correctly.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    bismitapadhy (6th July 2009)

  4. #3
    Join Date
    May 2009
    Posts
    94
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Remove a string from QStringList

    Quote Originally Posted by wysota View Post
    Use QList::removeAt() or QList::removeAll(). And read the docs next time if you can't guess the method name correctly.
    I already read the document.As it is giving a error i posted the Question.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Remove a string from QStringList

    Quote Originally Posted by bismitapadhy View Post
    I already read the document.
    What document?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #5
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Remove a string from QStringList

    or use some IDE which has code completer instead of plain old text editor.

Similar Threads

  1. How to remove duplicate enteries from QStringList.
    By merry in forum Qt Programming
    Replies: 5
    Last Post: 7th March 2019, 15:02
  2. Replies: 0
    Last Post: 18th February 2009, 13:31
  3. QStringList
    By jaca in forum Qt Programming
    Replies: 5
    Last Post: 17th May 2008, 10:12
  4. QStringList in QObject::connect
    By DPinLV in forum Qt Programming
    Replies: 6
    Last Post: 6th September 2006, 17:01
  5. QStringList ......how to ignore a string
    By :db:sStrong in forum Qt Programming
    Replies: 10
    Last Post: 8th August 2006, 15:04

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.