Results 1 to 2 of 2

Thread: application freezes from click of pushbutton

  1. #1
    Join Date
    Aug 2011
    Posts
    35
    Thanks
    5

    Default application freezes from click of pushbutton

    So , I have finally managed to get my pushButton1 to produce a sine wave. Thanks to everybody for your help so far.
    I have now run into a new problem. once I click my pushButton1, a sine wave us generated but my window becomes unresponsive i.e.(its frozen so I can’t push any other buttons). My wish is to be to stop the sine wave from running with my other pushButton2, but since it freezes the moment I push the pushButton1, I can’t do this. I think it is because my program goes on a never ending while loop.
    So my question is: How would I terminate this while loop with the click of pushButton2?

  2. #2
    Join Date
    Jun 2011
    Posts
    21
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: application freezes from click of pushbutton

    you must use QThread. see documentation
    http://doc.qt.nokia.com/latest/qthread.html

Similar Threads

  1. QGraphicsScene with scaled item freezes application on click
    By FlashMuller in forum Qt Programming
    Replies: 2
    Last Post: 31st January 2011, 14:51
  2. Right-Click menu on a pushButton doesn't show up
    By qtpyqt in forum Qt Programming
    Replies: 6
    Last Post: 9th September 2010, 18:58
  3. Replies: 1
    Last Post: 30th April 2010, 14:25
  4. twice execution of click on pushbutton?
    By rambo83 in forum Newbie
    Replies: 8
    Last Post: 10th November 2009, 13:21
  5. pushButton click event
    By aj2903 in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2009, 12:19

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.