Results 1 to 9 of 9

Thread: QList, duplicate problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: QList, duplicate problem

    So I'll expand this else code to check which line in the list isEmpty...or is there any better way?
    A better way to do what exactly? Your code will not add "Barney" twice (but it will add "barney" or "Barney " if asked to). The list will not contain empty strings unless your code is run with an empty string and one does not already exist.
    Last edited by ChrisW67; 5th August 2014 at 21:46. Reason: updated contents

Similar Threads

  1. removing duplicate itens from QList<int>
    By john_god in forum Qt Programming
    Replies: 6
    Last Post: 7th August 2014, 06:56
  2. Problem with QSqlQuery and duplicate entry
    By Pit in forum Qt Programming
    Replies: 5
    Last Post: 27th August 2012, 11:40
  3. Replies: 4
    Last Post: 20th August 2010, 13:54
  4. Replies: 1
    Last Post: 16th June 2010, 20:19

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.