Results 1 to 8 of 8

Thread: Using QProcess..........

  1. #1
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Wink Using QProcess..........

    hi....

    i had created an application which has pushbuttons. when i click a pushbutton, a web browser should open(i had built konqueror embedded web browser compiled with qvfb option). this is my requirement. but when i execute the program, the web browser opens,but website is not displayed,instead a blank page is displayed. when i close the application, the webpage is displayed...

    can anyone say me why is that so...?any suggestions and solutions fro this...?

    thanks in advance......

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using QProcess..........

    We'd have to see the code you used to open the page.

  3. #3
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Using QProcess..........

    hi

    i'm sending the code............
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using QProcess..........

    Qt Code:
    1. void keyclass::enter()
    2. {
    3.  
    4. QProcess process(QString("/home/kdeprograms/konqueror/konqueror3-embedded-0.2-20060121/konq-embed/src/konqueror"));
    5. process.addArgument("http://www.yahoo.com");
    6. process.start();
    7. }
    To copy to clipboard, switch view to plain text mode 
    You create the process on the stack. QProcess::start() doesn't block the flow until the process exits but instead just schedules its start and continues the program. At that time the function returns and the process gets destroyed before it even had a chance to start. To avoid it, you have to create the process on heap.

  5. #5
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Using QProcess..........

    hi....

    thanks for the reply. can you say me how create the process on a heap...?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using QProcess..........

    Using operator "new".
    Qt Code:
    1. QProcess *process = new QProcess(this);
    To copy to clipboard, switch view to plain text mode 

  7. #7
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Using QProcess..........

    hi...

    thank you for the reply. i'l try that and will let you know..

  8. #8
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Using QProcess..........

    hi....

    thank you. i finally got it working.....

Similar Threads

  1. QProcess & linux shell characters
    By Ti_Thom in forum Qt Programming
    Replies: 4
    Last Post: 21st December 2009, 10:01
  2. problem with qprocess
    By deekayt in forum Qt Programming
    Replies: 2
    Last Post: 13th June 2006, 13:30
  3. QProcess start automaticaly needed application
    By raphaelf in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2006, 14:11
  4. speed up qprocess readstdout
    By kooshball in forum Qt Programming
    Replies: 1
    Last Post: 31st January 2006, 09:42
  5. QProcess in a QThread
    By chombium in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2006, 15: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
  •  
Qt is a trademark of The Qt Company.