Qt Update Gui From Another Thread
• • • • • Update GUI from another thread • If this is your first visit, be sure to check out the by clicking the link above. You may have to before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Multithreading with a GUI. A more general solution is showed in another post. 2011 Label: Cxx, Qt, thread. Email This BlogThis! Share to Twitter Share to.
• Welcome to Qt Centre. Is a community site devoted to programming in C++ using the. Over 90 percent of questions asked here gets answered. If you are looking for information about Qt related issue — and post your question. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features.
By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please,! If you have any problems with the registration process or your account login, please. I'm struggling with the following problem for quite some time.
My application runs heavy mathematical equations based on input files. The actual work is done within a separate thread. This way the GUI remains responsive. Rohff Au Dela De Mes Limited Rare. Everything works great, but I just can't figure out how to update the GUI from the separate thread.
Jam Project Best Collection Viii Rarity here. While processing the equations I want the GUI to show which equation is currently processed. I just recently started using QT. This because I need to develop a application that runs on both Windows and Mac.
The concept of slots is hard to me. I have developed many applications using Xcode and Cocoa. In this environment I can create complicated multithreading applications (that continuously update the GUI) without any problem. My C++ knowledge is average. It drives me crazy. I spend to much time figuring this out.
And still no result. To the point: Who can create an sample project for me?
The sample must contain: - GUI with one text-box / button - Clicking the button starts a new thread - The new thread executes a loop 5 times. - The loop simulates a heavy process (for example by using 1-second sleep) - Every time the loop starts the GUI is updated by appending a line to the textbox. I'm willing to pay for your time. I definitely need some help here. Please keep the sample as simple as possible.
This way i can understand how it works. (A little desperate) Kind regards, Anne.
Dear Lykurg and ^NyAw^, Wow, is it just that simple?! QT really amazes me. You really helped me out here, everything is perfectly clear right now. I was thinking too complicated.
In Xcode / Cocoa it's actually much harder to do exactly this. If you ever have any Xcode / Cocoa related question, please contact me!
Generally I never ask for help. I want to figure out things like these myself. In the long run this is the best way to learn a new language in my opinion. But in this case I was completely stuck. I did not really intend to offer a job, was just asking for an example.
Please give me some info on how to donate to qtcentre.org (can't find the PayPal address). I love communities like these and always support them. All your help is greatly appreciated, Kind regards, Anne. @^NyAw^ and Others I tried to open your sample project, but the folder does not contain any.pro files.
The only files I see are.h,.cpp,.ui and.qrc. How can I open such an project directly with QT? The.qrc is not recognized? (Of cours I now just directly used the.cpp and.h files, but was just curious)I just don't added the pro file because I'm using Visual Studio on Windows and I'm not using the pro file, but there is an option to create the pro file that then I can attach. Just use 'qmake -project' as Lykurg said to create the 'pro' file and then call 'make' to compile the project.