Results 1 to 6 of 6

Thread: QTextEdit not deleted when implemented as list

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default QTextEdit not deleted when implemented as list

    Dear All
    I have list of QTextEdit, I am creating the edit box and then trying to delete but its not deleting. Can u anyone tell me what I am doing wrong.

    Qt Code:
    1. QList<QTextEdit *> list;
    2. int w = 100;
    3. int h= 25;
    4. int incre=0;
    5. for(i=0; i<2; i++)
    6. {
    7. list.append(new QTextEdit(this));
    8. list.at(i)->setGeometry(0,0+incre,w,h);
    9. list.at(i)->show();
    10. incre = incre+h+10;
    11. }
    12.  
    13. int cnt = list.count();
    14. for(int i=0; i<cnt; i++)
    15. delete list.at(i);
    16. list.clear();
    To copy to clipboard, switch view to plain text mode 

    But even after deleting the edit boxes I can still see them, means they’re not being deleted. Whats wrong , any help would be appreciated.
    Last edited by wysota; 23rd June 2011 at 17:14. Reason: missing [code] tags

Similar Threads

  1. MultiScale support can be implemented?
    By umituzun84 in forum Qwt
    Replies: 1
    Last Post: 7th February 2011, 10:23
  2. SIP stack implemented with Qt
    By iaguirre in forum Qt-based Software
    Replies: 0
    Last Post: 26th January 2011, 16:19
  3. How to add nest list in QTextEdit?
    By FinderCheng in forum Qt Programming
    Replies: 0
    Last Post: 11th December 2010, 06:23
  4. QDirectPainter::unlock () implemented?
    By TTGator in forum Qt Programming
    Replies: 0
    Last Post: 20th November 2008, 20:40
  5. An Implemented QHttp Object
    By bhs-ittech in forum Qt Programming
    Replies: 11
    Last Post: 18th August 2006, 14:47

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.