Results 1 to 10 of 10

Thread: How to run "more" command using Qprocess ???

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Posts
    173
    Thanks
    48
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to run "more" command using Qprocess ???

    Hello guys,

    I am trying to run the "more" command in Linux using the Qprocess

    what i have been trying is :


    Qt Code:
    1. ......
    2. .......
    3. myProcess->setWorkingDirectory(ui->LE_workingdir->text().trimmed());
    4. myProcess->start("/bin/sh");
    5. myProcess->write("more filename\n\r");
    6.  
    7. // I have the slots to get all the reads from the process
    8. }
    To copy to clipboard, switch view to plain text mode 

    but i am not getting any info, please any idea what is wrong i am doing here

    Thank you so much for taking time to read this


    I also tried
    myProcess->start("/bin/sh", QStringList()<< "-c" << "more filename"));
    and
    myProcess->start("/bin/sh", QStringList()<< "-c" << "more" << "filename"));

    but it didnot work too
    Last edited by jesse_mark; 3rd October 2012 at 23:23.

Similar Threads

  1. Replies: 7
    Last Post: 20th October 2012, 13:44
  2. Replies: 4
    Last Post: 15th July 2012, 02:41
  3. Replies: 2
    Last Post: 27th July 2011, 04:24
  4. Replies: 11
    Last Post: 26th July 2010, 05:01
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Tags for this Thread

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.