Results 1 to 2 of 2

Thread: QString deletion

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Posts
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QString deletion

    Here is a sample code:

    Qt Code:
    1. QList<QString> list;
    2. QString value;
    3. value.setNum(10,10);
    4. for(int i=0;i<10;i++)
    5. list.append(value);
    To copy to clipboard, switch view to plain text mode 

    Here is got a problem.It says that in the for loop, it is destroying the string value. So my application is exiting.

    Is there any suggestion for this?
    Last edited by wysota; 14th March 2011 at 08:37.

Similar Threads

  1. deletion problem with QGraphicsScene
    By spawn9997 in forum Qt Programming
    Replies: 2
    Last Post: 26th February 2010, 21:49
  2. Controling the deletion of objects?
    By mooreaa in forum Qt Programming
    Replies: 3
    Last Post: 4th July 2008, 19:08
  3. Custom model item deletion (Qt4.4)
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 22nd May 2008, 15:35
  4. QPointer and double deletion
    By mtrpoland in forum Qt Programming
    Replies: 6
    Last Post: 28th September 2007, 13:49

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.