Results 1 to 3 of 3

Thread: basic qthread question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: basic qthread question

    You are creating the thread on the stack inside the loop, so the object (and the thread behind it) gets killed before it has a chance to do anything. And you might be experiencing a crash if you never reach the second iteration of the loop.

  2. #2
    Join Date
    Sep 2008
    Posts
    23
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1

    Default Re: basic qthread question

    You are right, I now use the signal/slot and QList to hold the trashthread, and each time I can release a small amount of trashthread (the real program takes large memory) each time when some trashthread finished. Thanks.

Similar Threads

  1. Basic question on QComboBox
    By Raccoon29 in forum Newbie
    Replies: 2
    Last Post: 9th May 2008, 17:41
  2. Replies: 2
    Last Post: 21st February 2008, 23:35
  3. QThread exit()/quit() question
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2006, 15:38
  4. Basic question on new and delete
    By jcr in forum General Programming
    Replies: 25
    Last Post: 14th February 2006, 16:09
  5. Using QSA: A very basic question
    By yogeshm02 in forum Newbie
    Replies: 3
    Last Post: 26th January 2006, 08:34

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.