Results 1 to 4 of 4

Thread: Wait for a function to finish

  1. #1
    Join Date
    Oct 2009
    Posts
    38
    Thanks
    13
    Platforms
    Unix/X11 Windows

    Default Wait for a function to finish

    Hi,

    how can I do that ?

    thanks

  2. #2
    Join Date
    Jun 2007
    Location
    Massachusetts, USA
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Wait for a function to finish

    How do you not do it? Just what is the problem?

    If you make a normal function call:
    Qt Code:
    1. ...
    2. go_get_something();
    3. do_the_next_thing();
    4. ...
    To copy to clipboard, switch view to plain text mode 
    "do_the_next_thing" will not happen until after "go_get_something" finishes.

  3. #3
    Join Date
    Oct 2009
    Posts
    38
    Thanks
    13
    Platforms
    Unix/X11 Windows

    Default Re: Wait for a function to finish

    Ok thank you !

    And I guess it is the same thing with:

    go_get_something(); // returns true or false

    Qt Code:
    1. ...
    2. if(go_get_something()){
    3.  
    4. do_the_next_thing();
    5.  
    6. }
    7. ...
    To copy to clipboard, switch view to plain text mode 

    First, it runs go_get_something() then, if it returns true, it runs do_the_next_thing ?

  4. #4
    Join Date
    Jun 2007
    Location
    Massachusetts, USA
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Wait for a function to finish

    First, it runs go_get_something() then, if it returns true, it runs do_the_next_thing ?
    That's right.

  5. The following user says thank you to rknowles for this useful post:

    fitzy (26th October 2009)

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 15:22
  2. Regading Driver to connect Postgresql Database
    By dummystories in forum Installation and Deployment
    Replies: 38
    Last Post: 12th March 2009, 08:19
  3. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 13:57
  4. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 18:33
  5. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 13:52

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.