Guest User

Untitled

a guest
Apr 17th, 2011
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. /* main.cpp */
  2. int main(int ac, char **av)
  3. {
  4. QApplication a(ac, av);
  5. test b;
  6.  
  7. while (1)
  8. {
  9. a.processevents();
  10. b.manage();
  11. }
  12.  
  13. return a.exec();
  14. }
  15.  
  16. /* test.cpp */
  17.  
  18. int test::manage()
  19. {
  20. if (somecondition)
  21. {
  22. if (!fork) //Son Process not working properly ?
  23. {
  24. QApplication a(ac, av);
  25. toto b;
  26.  
  27. while (1)
  28. {
  29. a.processevents();
  30. b.manage();
  31. }
  32. return a.exec();
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment