Results 1 to 3 of 3

Thread: Frozen? ... no ... calling 01800 Database

  1. #1
    Join Date
    Nov 2006
    Posts
    41
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Frozen? ... no ... calling 01800 Database

    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?
    Last edited by chaosgeorge; 26th November 2006 at 01:19.

  2. #2
    Join Date
    Nov 2006
    Posts
    41
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Frozen? ... no ... calling 01800 Database

    as like the most of times...

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

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Frozen? ... no ... calling 01800 Database

    Quote Originally Posted by chaosgeorge View Post
    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).

Similar Threads

  1. Filling combobox from database
    By Philip_Anselmo in forum Qt Programming
    Replies: 3
    Last Post: 11th May 2006, 17:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.