PDA

View Full Version : Frozen? ... no ... calling 01800 Database



chaosgeorge
26th November 2006, 01:15
Hi, i want to let the user know my app is not frozen when its processing a query i do this by a progress bar but its only shown when the dialog is visible, however in the constructor of my dialog executing a query i placed a function to populate a table widget and user can see some data when the window shows however this query takes a little long 'cause its a remote database so it looks like the app is frozen before the dialog appears with the data loaded, i want to show the progress bar even if the dialog is not visible yet so the user dont think its frozen, how can i do that? should i place the query function somewhere else?
thanks

btw i can see the bar is back of my window but, how can i bring it to front and the bar?

chaosgeorge
26th November 2006, 01:45
as like the most of times... :p

well i can see now the progress dialog however i cant see the bar, what i do?

jacek
26th November 2006, 13:06
well i can see now the progress dialog however i cant see the bar, what i do?
Most likely you block the event loop and Qt can't redraw anything. If the query itself doesn't take long to execute, you can invoke "QApplication::processEvents( QEventLoop::ExcludeUserInputEvents );" after you fetch one row (or few rows).