Results 1 to 11 of 11

Thread: main loop

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1

    Default main loop

    Hi, I want to communicate with server to receive information. I do it in infinite while loop in other thread but I can't use threads so I have to include the thread's code somewhere into MainWindow Class. I've tried below showing main window function but the application doesn't want to show the form. I don't know is there something like main loop in qt because i could not find it in google.

    Qt Code:
    1. QApplication a(argc, argv);
    2. MainWindow w;
    3. w.show();
    4.  
    5. while(1){}
    6.  
    7. return a.exec();
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 5th June 2009 at 13:25.

Similar Threads

  1. HAL & DBusConnection & Qt main loop integration
    By juannm in forum Qt Programming
    Replies: 3
    Last Post: 15th January 2009, 08:06
  2. Main Thread Event loop
    By ^NyAw^ in forum Qt Programming
    Replies: 1
    Last Post: 20th March 2007, 12:10
  3. Replies: 4
    Last Post: 10th March 2007, 18:01
  4. Workload in a QThread blocks main application's event loop ?
    By 0xBulbizarre in forum Qt Programming
    Replies: 14
    Last Post: 9th April 2006, 21:55
  5. While statement inside the main loop
    By OnionRingOfDoom in forum Qt Programming
    Replies: 4
    Last Post: 8th February 2006, 18:17

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
  •  
Qt is a trademark of The Qt Company.