Results 1 to 8 of 8

Thread: Implementing threads...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Posts
    22

    Default Implementing threads...

    Hi,
    I am making an external process call in QT and trying to compile a file. I want to show the progress of the process either using a progress dialog or just a message box. In my compile() function where I make the call to the external process, I have written it like


    Qt Code:
    1. QProgressDialog progressDialog(this);
    2.  
    3. progressDialog.setCancelButtonText(tr("&Cancel"));
    4.  
    5. progressDialog.setRange(0, fname.size());
    6.  
    7. progressDialog.setWindowTitle(tr("Compile"));
    8.  
    9.  
    10.  
    11. progressDialog.show();
    12.  
    13.  
    14.  
    15. for (int i = 0; i < fname.size(); ++i) {
    16.  
    17. progressDialog.setLabelText(tr("Compiling the current file..."));
    18.  
    19. progressBar.setValue(i);
    20.  
    21. }
    To copy to clipboard, switch view to plain text mode 

    This works fine in windows i.e. the progress dialog is visible when the compile is in progress but this does not show the progress bar in Linux. Please let me know what the possible error could be and how to rectify.
    Last edited by jpn; 6th June 2008 at 08:44. Reason: missing [code] tags

Similar Threads

  1. Replies: 8
    Last Post: 27th March 2013, 11:51
  2. signal and slot across threads having event loop
    By travis in forum Qt Programming
    Replies: 6
    Last Post: 5th November 2007, 23:56
  3. Once more: Threads in Qt4
    By high_flyer in forum Qt Programming
    Replies: 5
    Last Post: 9th August 2006, 18:35
  4. [QT4] threads, signals, and slots, please help.
    By ucntcme in forum Qt Programming
    Replies: 12
    Last Post: 25th January 2006, 14:23

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.