How to change progressBar in qTableWidget
-
-
You might want to consider implementing a QStyledItemDelegate that fills the cell according too the number of passengers.
-
No I don't because I don't know what your application does.
You could be reading and writing data uselessly, you could be trying to access slow devices, you could be doing something wrong in another part of your application, you could be calling some wait function somewhere, your users my be using your application on overloaded machines. Performance wise, having many cell widgets wont help at all.
-
Like I already wrote, there's no way to guess what's taking time from images while not knowing what else is currently going on within your application.
-
Hi
just as a note
why are you using Sleep(3); ? in your code?
That will slow it down.30-40 seconds seems very long.
How many rows do you have ?
Must be many or you must have some sort of loop in loop.To help find out what is slow you can use timing
using namespace std::chrono; high_resolution_clock::time_point t1 = high_resolution_clock::now(); // put in top of function ... do stuff here... high_resolution_clock::time_point t2 = high_resolution_clock::now(); // put last in function auto duration = duration_cast<microseconds>( t2 - t1 ).count(); // also last std::cout <<"spot 1:" << duration;
That might help find out where all the time goes.
Sadly we cant just guess it as nothing springs to mind from the code shown.Normally sqlite is pretty fast and both reading and writing should not take that long unless you
have massive amount of train data.how long (elements) are the vector<cities> &s ?
you do seem to loop it for each row. -
@mrjj I have discovered that( Not responding ) is created when i click the screen while loading (do you have any ideas how could I make my mouse cursor loading in program window to not allow any click), but I have discovered also that if left the program for some time and want to add any information afterward it also makes Not responding to appear)
-
If you don't want your user to click anything, show a modal dialog explaining what is going on with maybe an infinite progress bar.
-
@mark_ua_1999 hi,friend.welcome.
I think the example Torrent download like your application's UI. It also has the
progressBar in table
. so you can reference it.