Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
2.00/5 (3 votes)
I am writing data from my board into txt file. on my main window i have two buttons "start" and "stop" when i click on start cursor becomes busy(hourglass). And i cant click on stop button anymore. any suggestion to come out of this problem ???
Posted
Comments
Jochen Arndt 1-Dec-15 10:41am    
What kind of code is executed when clicking on Start?

The UI will be blocked until that code returns. If it is some kind of lengthy task, you must create a thread and execute that code inside the thread. See http://doc.qt.io/qt-5/thread-basics.html.
XamBEE 1-Dec-15 11:32am    
I get the idea now. Thanks for your valuable comment.

1 solution

Use a worker thread to transfer your data, or at least use PeekMessage to poll your message queue to see if there are any messages.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900