Is there a way to increase the processing speed of the main gui?
-
Hi
I am thinking about processing qChart and new dialog windows with a lot of data.The main window has qchar and grid.
Progress slows when a dialog window with progress bar is displayed above the main window window.
It is okay when there is little data in the chart, but the more data there is, the slower the progress is.I understand that gui work should be done on the main thread.
I don't think I can move the progress to another thread.
Is there any way to improve the speed?The qt is 5.15 and the qchart uses lineseries (40 ea) and scatterseries (80 ea) (15 ea) together, with about 35,000 data tested.
-
I’m going to have to assume what you are trying to accomplish, you have many context clues and not enough context to assume the context.
As far as I can understand you don’t want the application to become “in waiting” status on systems. Which essentially you don’t want your graphics interface to become
Non responsive. This is called, “I don’t want to block the GUI”. If your application is “blocking” the responsiveness of the gui, you will then have to write your code so it executes in multiple functions and then has an else statement that checks to see if it waited about 10 milliseconds, which turns the else if to resume executing your code; This is doable, and fun , requires a lot of time and error checking every line of code. Your alternative is using the function you didn’t want, by using workers or threads.This will solve the problem as the CPU will then give dedicated turn(varying in time sizes and are OS kernal defined) to both the GUI responsiveness and the code section that currently are “blocking” the GUI responsiveness a time slice turn. Easier on the mind, error checking is like “business as usual” checks, no resuming segments(which make your code unreadable by investors and code helpers, and is quite a tidious mental process to construct resumeable code).